File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes redirectPort not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "redirectPort not working " Watch "redirectPort not working " New topic
Author

redirectPort not working

Jaime Acosta
Greenhorn

Joined: Nov 24, 2010
Posts: 4
Hello,

I have tomcat 5.5 set up for my web application with ssl working properly. I would like to redirect all http traffic to https. From my understanding, i should simply have to set the ssl connector to 443 and add 'redirectPort="443"' to the connectors for 80 and 8080 in the server.xml like this:



I also added the following to the end of my web.xml (just before </web-app>), based on information provided in instructions I found online:


As i mentioned above, the ssl is working properly, and I can browse to https://site.com, as well as http://site.com and http://site.com:8080. Unfortunately, the latter two do not redirect to the https://site.com addresss like I intend it to. Is there something I'm missing?

Thanks!
 
Consider Paul's rocket mass heater.
 
subject: redirectPort not working