配置tomcat只接收get,post请求方法

在web.xml文件中配置以下内容

<security-constraint>  
        <web-resource-collection>  
            <url-pattern>/*</url-pattern>  
            <http-method>PUT</http-method>  
            <http-method>DELETE</http-method>  
            <http-method>HEAD</http-method>  
            <http-method>OPTIONS</http-method>  
            <http-method>TRACE</http-method>
        </web-resource-collection>  
        <auth-constraint>  
        </auth-constraint>  
    </security-constraint>

欢迎大家加入小密圈,一起交流进步

zhutougg

继续阅读此作者的更多文章