<pre> 1. I am using SSL in Tomcat 7, create a keystore and configure server.xml, and also config in web.xml as below
<b> <security-constraint>
<web-resource-collection>
<web-resource-name>SSL</web-resource-name>
<url-pattern>/inspectionGp/*</url-pattern>
<url-pattern>/inspection/*</url-pattern>
<url-pattern>/inspGpDt/*</url-pattern>
<url-pattern>/inspDt/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
2.这适用于SSL,这些受限制的URL被迫仅使用SSL,但其他URL也可以同时使用HTTP和HTTPS,这很奇怪,我不想对未在中配置的URL使用HTTPS。我使用NONE,这将导致所有URL同时支持HTTP和HTPPS。那么任何人都可以帮助解释我如何解决它吗?
3. And another issue, why other the links are https when I click the url which only support https
传输保证是连接必须满足的最低级别。因此,如果最小传输保证为 NONE,则使用 TLS 是完全有效的。
如果要强制切换回 TLS,则需要对此进行显式编码。选项包括:
- 在指向要使用 http 的页面的链接中显式使用 http
- 编写一个重定向到 http 的过滤器,并将其映射到要用于 http 的 URL