aspose file tools*
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 Spring in Action this week in the Spring 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: SSL Redirect in Tomcat Standalone