分享《Spring2.0核心技术与最佳实践》作者廖雪峰的SSL配置文档
希望对大家在Tomcat的配置上有所帮助
按照文档中的步骤操作完后
修改Tomcat\conf\web.xml
在</welcome-file-list>下添加
<!-- 强制使用https访问页面 -->
<security-constraint>
<web-resource-collection>
<!-- 定义使用https访问的URL -->
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
希望对大家在Tomcat的配置上有所帮助
按照文档中的步骤操作完后
修改Tomcat\conf\web.xml
在</welcome-file-list>下添加
<!-- 强制使用https访问页面 -->
<security-constraint>
<web-resource-collection>
<!-- 定义使用https访问的URL -->
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>