To setup HTTPS on Tomcat5 I followed the steps below. A useful link for this information is
http://mindprod.com/jgloss/keytool.html.
1. Generate the certificate
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA
(The default password for the keystore is "changeit". )
2. Self sign the certificate
keytool -selfcert -alias tomcat
3. Export the certificate to file
keytool -export -alias tomcat -rfc -file mytomcatcert.cer
4. Import the certificate into the CA certs store
keytool -import -keystore %JAVA_HOME%\jre\lib\security\cacerts -alias tomcat -file mytomcatcert.cer
5. Add HTTPS connector to server.xml, pointing to the .keystore file
<Connector acceptCount="256"
clientAuth="false"
debug="0"
disableUploadTimeout="true"
enableLookups="false"
keystoreFile="D:/Tomcat5/conf/.keystore"
keystorePass="changeit"
maxSpareThreads="512"
maxThreads="150"
minSpareThreads="50"
port="443"
scheme="https"
secure="true"
sslProtocol="TLS"/>