1. 首先要安装jsse,需要jcert.jar,jnet.jar,jsse.jar三个jar;
2. 然后添加keystore:
%JAVA_HOME%\bin\keytool -delete -alias tomcat -keypass changeit
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keypass changeit -keyalg RSA
%JAVA_HOME%\bin\keytool -export -alias tomcat -keypass changeit -file
%FILE_NAME%
%JAVA_HOME%\bin\keytool -import -file server.crt -keypass changeit
-keystore %JAVA_HOME%/jre/lib/security/cacerts
%JAVA_HOME%\bin\keytool -import -file server.crt -keystore
%JAVA_HOME%\jre\lib\security\cacert
3. 然后在%catalina_home%\conf\server.xml.中取消SSL的注释.
4. visit
http://localhost:8443/ test it.
参考
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/ssl-howto.html.