Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

My web app is running, so that access to /admin/login.jsp happens over an unsecure HTTP connection.

I do not want to change web.xml file.

How can I change access to /admin/login.jsp from HTTP to HTTPS without editing the web.xml file?

Is there a way other than changing the web.xml file?

share|improve this question
    
Could you explain this a bit more? I don't get what you are trying to do. –  Bart De Vos Jan 24 '12 at 14:21

1 Answer 1

Are you using Apache in front of Tomcat?

Yes? Well, that's easy. Read my answer about redirecting HTTP to HTTPS here.

No? Well, you should be. Not only does Apache make an excellent reverse-proxy for Tomcat JSPs, but it also allows you to do things like rewriting URLs onto HTTPS, as well as caching with a number of modules for Apache.

Quick answer: Use apache, redirect /admin/login.jsp to HTTPS and use Apache to wrap everything up in a sexy little SSL transaction

share|improve this answer
    
i used standalone tomcat. do you mean is :<% Response.Redirect("example.com/admin/login.jsp") %> ? i Look for automatic way with once setting without editing jsp page? –  amir2 taghvaei Jan 24 '12 at 17:00
    
Nono.. I mean if you use apache in front of tomcat with mod_proxy or mod_jk, then you can use apache to wrap the requests in a SSL session –  Tom O'Connor Jan 24 '12 at 21:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.