【问题标题】:Switching between HTTPS and HTTP in Java web application在 Java Web 应用程序中在 HTTPS 和 HTTP 之间切换
【发布时间】: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?

【问题讨论】:

    标签: tomcat ssl https


    【解决方案1】:

    这可能不是您要寻找的答案,但您是否考虑过使用 HTTPS?

    来自this article

    SSL/TLS 不是计算性的 再贵。

    【讨论】:

      猜你喜欢
      • 2011-10-20
      • 1970-01-01
      • 2014-01-11
      • 2010-11-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-17
      • 2016-05-17
      相关资源
      最近更新 更多