jGuru
Register Email     Password Forgot your
password?
HOME FAQS FORUMS DOWNLOADS ARTICLES PEERSCOPE LEARN

  Search   jGuru Search Help

Question How can I support HTTPS (SSL) in a servlet?
Derived from A question posed by Al Buk
Topics Java:API:Security, Java:API:Servlets:Security, Java:API:Servlets:Products:Microsoft IIS
Author Jim Garrett
Created May 22, 2000 Modified Aug 24, 2000


Answer
The servlet technology by design already supports https (SSL). However, the way this works is not through the servlet technology but through the Web Server. The web server controls whether information is done securely (https) versus non-securely (http).

One way to force servlets to go down the https path is to define your web server to only allow secure connections when accessing servlets. In IIS this can be accomplished through the definition if ISAPI filters. The ISAPI filter can instruct the web server to route all requests that end with a pre-defined prefix to the servlet engine. The trick is to then define files, with the predefined extension, in the web servers directory. For example, if the servlet's name is MyServlet a file with the name MyServlet.xxx would be placed on the web server. All calls to this file would be routed to the servlet engine. And IIS would be used to force all calls to the MyServlet.xxx file to go through https. The JRun servlet engine has examples of how to do this documented on their web page.

Is this item helpful?  yes  no     Previous votes   Yes: 1  No: 0



Comments and alternative answers

Comment on this FAQ entry

Tomcat supports SSL, either through Apache, or on its...
Alex Chaffee PREMIUM, Jun 21, 2000
Tomcat supports SSL, either through Apache, or on its own (currently in an unstable state, though it should work in time for the next major release).

Is this item helpful?  yes  no     Previous votes   Yes: 1  No: 0



Reply to this answer/comment  Help  
Does anybody know how to do that for Apache/JServ ?...
Victor Stratan, Oct 26, 2000
Does anybody know how to do that for Apache/JServ ? [Yes, see the Tomcat documentation web site. -A]

Is this item helpful?  yes  no     Previous votes   Yes: 0  No: 0



Reply to this answer/comment  Help  


Ask A Question



 
Related Links

Security FAQ

Security Forum

Java Security Home

Java Security Documentation

jGuru.com Fundamentals of Java Security tutorial

The Java Secure Socket Extension (JSSE) with SSL support

Servlets FAQ

Servlets Forum

Servlet-related resource list from Purple Technology

jGuru JSP FAQ

Sun Servlet Home Page

java.isavvix.com

Wish List
Features
About jGuru
Contact Us

 



The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers