web工程禁用HTTP中PUT/ELETE等请求,防止恶意访问

在web.xml最后加入如下节点
<!--禁用PUT/DELETE请求 --> <security-constraint>   <web-resource-collection> <url-pattern>/*</url-pattern> <http-method>PUT</http-method> <http-method>DELETE</http-method>   </web-resource-collection>   <auth-constraint>   </auth-constraint> </security-constraint>

  

猜你喜欢

转载自www.cnblogs.com/lansetuerqi/p/9376817.html