首先你得學會如何配置https
http://blog.csdn.net/A_Xi_Baa/article/details/79192826
tomcat7編輯tomcat/conf/web.xml
在</welcome-file-list>後面加入以下這段話
<security-constraint>
<!-- Authorization setting for SSL -->
<web-resource-collection >
<web-resource-name >SSL</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
修改完之後重啓就可以了,有問題的話有的發現網址指向的後面有個端口,解決如下
再編輯tomcat/conf/server.xml,找到端口那裏,把【redirectPort="8443"】去掉
tomcat8編輯tomcat/conf/web.xml
<login-config>
<!-- Authorization setting for SSL -->
<auth-method>CLIENT-CERT</auth-method>
<realm-name>Client Cert Users-only Area</realm-name>
</login-config>
<security-constraint>
<!-- Authorization setting for SSL -->
<web-resource-collection >
<web-resource-name >SSL</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
修改完之後重啓就可以了,有問題的話有的發現網址指向的後面有個端口,解決如下
再編輯tomcat/conf/server.xml,找到端口那裏,把【redirectPort="8443"】去掉