File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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: 17417

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: unable to use ssl in tomcat
It's not a secret anymore!