【发布时间】:2012-01-18 15:35:58
【问题描述】:
我只想从security-constraint 中排除一个JSP 文件question.jsp。
我的 web.xml 中有这个:
<security-constraint>
<display-name>My Security Constraint</display-name>
<web-resource-collection>
<web-resource-name>Protected Area</web-resource-name>
<url-pattern>*.do</url-pattern>
<url-pattern>*.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>*</role-name>
</auth-constraint>
</security-constraint>
【问题讨论】:
-
您可以创建一个文件夹并将其他所有内容(除了 question.jsp)放入该文件夹并使用该模式,例如
/securefolder/*.jsp. -
我有很多 JSP,所以风险很大。还有其他解决方案吗?
标签: java security jsp tomcat web