在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>