<security-constraint> <web-resource-collection> <web-resource-name>resouseName</web-resource-name> <url-pattern>/*</url-pattern> <http-method>PUT</http-method> <http-method>HEAD</http-method> <http-method>DELETE</http-method> <http-method>OPTIONS</http-method> <http-method>TRACE</http-method> </web-resource-collection> <auth-constraint /> </security-constraint>
时间: 2024-04-06 21:06:43 浏览: 109
web.xml详解(web-app_2_3.dtd)
4星 · 用户满意度95%
这是一个 Java Web 应用程序中的安全约束,用于限制对资源的访问。其中,<url-pattern>/*</url-pattern> 表示匹配所有的 URL;<http-method>PUT</http-method>、<http-method>HEAD</http-method>、<http-method>DELETE</http-method>、<http-method>OPTIONS</http-method>、<http-method>TRACE</http-method> 表示只允许使用这些 HTTP 方法进行访问。而 <auth-constraint /> 表示该资源不需要进行身份认证。
阅读全文