File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat and SSL" Watch "Tomcat and SSL" New topic

Tomcat and SSL

don cline
Ranch Hand

Joined: Oct 10, 2003
Posts: 35

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.

should not be accessable through

should not be accessable through

thanks in advance

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
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 ]
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
I agree. Here's the link:
subject: Tomcat and SSL
It's not a secret anymore!