This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes unable to use ssl in tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Products » Tomcat
Bookmark "unable to use ssl in tomcat" Watch "unable to use ssl in tomcat" New topic

unable to use ssl in tomcat

Abhi Agar

Joined: Jun 15, 2010
Posts: 26

Hi there, I am using tomcat 6.0.

I did these things:

1. Did "%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA" on command prompt and used password "changeit".

2. After that, I was able to see a ".keystore" named file at my "C:/users/Abhishek/" folder.

3. Used this setting at "conf/server.xml":--

<Connector protocol="org.apache.coyote.http11.Http11Protocol"
port="8443" minSpareThreads="5" maxSpareThreads="75"
enableLookups="true" disableUploadTimeout="true"
acceptCount="100" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="${user.home}/.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS"/>

4. Now, i started the server, but unbale to get anything, using this url: "https://localhost:8443/"

Can anybody tell me something? I DESPERATELY need to see this "https" working on my server!!!

Though i think the problem might be this:

I used one more setting in server.xml file, it is provided by default:--

<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

I have attached the server.xml file here for you to see.

Thanks in advance.

It's the belief in the power of your dreams that counts! (SCJP 5.0, SCWCD 5.0)
Misha Ver
Ranch Hand

Joined: Mar 03, 2008
Posts: 470
Have you checked the log files?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17026

I don't think you can do symbolic substitution (${user.home}/.keystore) in the Tomcat server config file. However, the most common reasons for failure are incorrect pathname for the keystore (which you would get if the symbolic reference wasn't expended) and invalid password on the keystore.

Both of those errors generate explicit messages in the Tomcat logfile. With my typing skills - or lack thereof - I've had the joy of seeing them many times.

Customer surveys are for companies who didn't pay proper attention to begin with.
Have you checked out Aspose?
subject: unable to use ssl in tomcat
jQuery in Action, 3rd edition