Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat and SSL

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
The world's cheapest jedi mind trick: "Aw c'mon, why not read this tiny ad?"
We need your help - Coderanch server fundraiser
https://coderanch.com/t/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic