HTTP Status 405

来源:互联网 发布:淘宝网 女士腕表 编辑:程序博客网 时间:2024/06/05 06:53

对于HTTP/1.1,父类HttpServlet的doGet或doPost等方法的默认实现是返回状态代码为405的HTTP错误表示

对于指定资源的请求方法不被允许。

解决方法:

在扩展的Servlert中重写doGet或doPost等方法来处理请求和响应时不要调用父类HttpServlet的doGet或doPost等方法,即去掉super.doGet(request, response)和super.doPost(request, response);

 


0 0
原创粉丝点击