首先生成一个服务器要出示的SSL证书:
%JAVA_HOME%/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore E:/apache-tomcat-5.5.17/conf/keystore
修改E:/apache-tomcat-5.5.17/conf/server.xml文件,将注视掉的如下的内容的注释去掉:
<Connector port="8443" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
keystorePass="yourKeyPass"
keystoreFile="E:/apache-tomcat-5.5.17/conf/keystore"
clientAuth="false" sslProtocol="TLS" />
访问
重起Tomcat之后通过https://localhost:8443