How do you set up standalone Tomcat 3.x to use HTTPS?

Alessandro A. Garbagnati

The instruction for setting up a standalone Tomcat that uses a secure connection are located inside the configuration file (TOMCAT_HOME/conf/server.xml):

First you need to set up a server certificate, and you need JSSE.

  1. Add JSSE jars to CLASSPATH
  2. Edit java.home/jre/lib/security/java.security
        Add:
          security.provider.2=com.sun.net.ssl.internal.ssl.Provider
  3. Do: keytool -genkey -alias tomcat -keyalg RSA
          RSA is essential to work with Netscape and IIS.
      Use "changeit" as password. ( or add keypass attribute )
    You don't need to sign the certificate.

Then, you need to uncomment the HTTPS connector that follows these instructions in the server.xml file:

  <Connector className="org.apache.tomcat.service.PoolTcpConnector">
    <Parameter name="handler"
        value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
  <Parameter name="port" value="8443"/>
  <Parameter name="socketFactory"
        value="org.apache.tomcat.net.SSLSocketFactory" />
</Connector>

Obviously changing the port number according to your needs.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact