无法使Tomcat安全性约束适用于conf \ web.xml

时间:2015-03-20 20:33:08

标签: security tomcat constraints web.xml

我部署了Tomcat webapp,它在WEB-INF级别使用安全约束(webapps \ app1 \ WEB-INF \ web.xml)。所以效果很好:

<security-constraint>
<web-resource-collection>
<web-resource-name>app1</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>

如果用户尝试通过HTTP,它只会将用户引导至HTTPS。我的问题是我不能让它在conf级别工作。 (CONF / web.xml)中

如果它在webapps中工作得很好,为什么它不能在那个级别工作?

0 个答案:

没有答案