【发布时间】:2010-06-22 13:23:29
【问题描述】:
我在 Tomcat 5.5 中设置了 SSL,并在我的 web.xml 中有以下内容:
<security-constraint>
<web-resource-collection>
<web-resource-name>SSL URLs</web-resource-name>
<url-pattern>/j_spring_security_check</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
当我提交操作 url 为“j_spring_security_check”的登录表单时效果很好,但是当我导航到应用程序中的任何其他 URL 时,应用程序在使用 URL 中带有 https 的 SSL 端口时卡住了。
我怎样才能只对某些 URL 使用 HTTPS,而让应用程序对其他 URL 恢复为纯 HTTP?
【问题讨论】: