wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Tomcat and SSL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat and SSL" Watch "Tomcat and SSL" New topic
Author

Tomcat and SSL

don cline
Ranch Hand

Joined: Oct 10, 2003
Posts: 35
All,

I would like to set up a stand alone tomcat with both HTTPS/SSL pages and HTTP non encrypted pages. Can anyone direct me to a good source or show me how to configure TOMCAT to support both. Of course, those pages that are encrypted should not be accessable through HTTP and those that are not encrypted should not be accessable through HTTPS.

Thus,
https://www.mypage.com/securepage/index.jsp
should not be accessable through
http://www.mypage.com/securepage/index.jsp

and
http://www.mypage.com/nonsecurepage/index.jsp
should not be accessable through
https://www.mypage.com/nonsecurepage/index.jsp

thanks in advance

Don
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41068
    
  43
The Tomcat docs have a quite thorough page on setting up SSL.

Requiring SSL for a particular page can be done in the web.xml file, but disallowing SSL for a particular URL is not possible (unless you catch it in a servlet, and take appropriate action).
[ November 30, 2006: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
It uses a URL based approach (configured in the web.xml) to identify the resources which are secure and which are not.

You can create a pattern for resources which require SSL support and which doesn't require SSL.


Rahul Bhattacharjee
LinkedIn - Blog
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Tomcat and SSL
 
Similar Threads
Jboss SSL
show different URL than my server..
SSL redirect problem for tomcat
jk connector tomcat 4.1.27
configuring https with tomcat - issue