This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Tomcat and the fly likes SSL Redirect in Tomcat Standalone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "SSL Redirect in Tomcat Standalone" Watch "SSL Redirect in Tomcat Standalone" New topic
Author

SSL Redirect in Tomcat Standalone

Suzanne Reiner
Greenhorn

Joined: May 22, 2001
Posts: 22
Hello,
I would like to forward any requests being handled by .jsp's to be redirected through SSL. The SSL Connector working successfully. Do I need to change the server.xml file to handle the redirect or is there a place in the web.xml I should be utilizing? Any suggestions are appreciated.
Thanks
Suzanne
sam prochazka
Greenhorn

Joined: Dec 14, 2002
Posts: 3
Hi,
You should add a redirect statement to your http connector so that directs all https calls to your ssl connector. The following is a connector in the server.xml file that redirects to port 443 (standard ssl port) for each https call.
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
port="80"
minProcessors="5"
maxProcessors="75"
enableLookups="true"
redirectPort="443"
acceptCount="10"
debug="0"
connectionTimeout="20000"
useURIValidationHack="false" />
Hope this helps,
Sam P.
Suzanne Reiner
Greenhorn

Joined: May 22, 2001
Posts: 22
Sam,
I have the redirect specification in the connector. What I would like to do is add a rule indicating any .jsp being handled by tomcat is redirected through https (even if it is not requested via the https protocol).
Thank you,
Suzanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SSL Redirect in Tomcat Standalone
 
Similar Threads
How to route an user from http to https
Another follow up to Servlets and SSL
Redirect a URL from http 9080 to https 9443
How to remove the port number in https adress?
How dows Https really work?