Configure Tomcat 6 For SSL Using Java Keytool
Configure Tomcat 6 For SSL Using Java Keytool
July 29
2009
Tomcat 6.0 Java Keytool Under Windows XP
How to configure the Tomcat 6.0 for Secure connection by using a self signed certificate, generated by Java keytool in detailed. J. M. V. Swamy Naidu M.C.A.
200 9
This article is helpful for the developer who wants to require the
secure connectivity to the Apache Tomcat 6.0 Server. In order to use this article you must already install the Tomcat 6.0 and Java. If not download install them for free from their respective sites Java SDK download here Tomcat 6.0 downloads here Here I assume the installation directories for the softwares are C:/Program Files/Apache Software Foundation/Tomcat 6.0 C:/Program Files/Java
Open the command prompt go to Java Installation directory and then to bin directory. Ex : C:/Program Files/Java/jdk1.6.0_10/bin/ Then type the following command to create the self signed certificate using Java keytool. Prompt> keytool genkey alias Tomcat keyalg RSA The above command creates a .keystore file at users home directory, if you doesnt find it then use the java property user.home to find it. Ex : class FindUserHome { public static void main(String arg[]) { System.out.println(System.getProperty(user.home) ; } } If you want to change the location of the keystore file then issue the keytool command with keystore property followed by the directory structure, where you want to save the keystore file.
200 9
200 9
If its not found over there then manually copy the entire tag to the server.xml file and save. Notice: Here, the two properties keystoreFile and keystorePass are initialized to their default values, if you change any of then during the creation of the certificate you must change them here also to run the server without any errors.