出现HTTP Status 405 - HTTP method GET is not supported by this URL 原因及解决方法:
2016-11-21 08:45
771 查看
1、继承自Httpservlet的Servlet没有重写对于请求和响应的处理方法:doGet或doPost等方法,默认调用父类的doGet或doPost等方法。
2、父类HttpServlet的doGet或doPost等方法覆盖了你写的到doGet或doPost等方法。
不管是1或2,父类HttpServlet的doGet或doPost等方法默认实现是返回状态码是405的Http错误表示 对于指定资源请求方法不被允许。
解决方法:
1、子类重写doGet或doPost等方法。
2、在你扩展的Servlet中重写doGet或doPost等方法来处理请求和响应时,不要调用父类的doGet或doPost等方法即去掉supper.doGet(request,response)和super.doPost(request,response);
2、父类HttpServlet的doGet或doPost等方法覆盖了你写的到doGet或doPost等方法。
不管是1或2,父类HttpServlet的doGet或doPost等方法默认实现是返回状态码是405的Http错误表示 对于指定资源请求方法不被允许。
解决方法:
1、子类重写doGet或doPost等方法。
2、在你扩展的Servlet中重写doGet或doPost等方法来处理请求和响应时,不要调用父类的doGet或doPost等方法即去掉supper.doGet(request,response)和super.doPost(request,response);
相关文章推荐
- 关于解决HTTP Status 405 - HTTP method POST is not supported by this URL方法之一
- 关于Servlet报错:405 HTTP method GET is not supported by this URL问题解决方法
- 出现HTTP Status 405 - HTTP method GET is not supported by this URL
- HTTP Status 405 - HTTP method GET is not supported by this URL
- HTTP Status 405 - HTTP method GET is not supported by this URL
- 当编写Servlet时出现type Status report message HTTP method GET is not supported by this URL description The
- 访问arcgisserver报:HTTP Status 405 - HTTP method GET is not supported by this URL
- HTTP Status 405 - HTTP method GET is not supported by this URL
- servlet错误:HTTP Status 405 - HTTP method GET is not supported by this URL
- servlet错误:HTTP Status 405 - HTTP method GET is not supported by this URL
- HTTP Status 405 - HTTP method GET is not supported by this URL
- 解决HTTP Status 405 - HTTP method POST is not supported by this URL 详解方案
- HTTP Status 405 - HTTP method GET(POST) is not supported by this URL
- 解决HTTP Status 405 - HTTP method POST is not supported by this URL 详解方案
- HTTP Status 405 - HTTP method GET is not supported by this URL
- 405: HTTP method GET is not supported by this URL
- 405--HTTP method GET is not supported by this URL
- HTTP Status 405 - HTTP method GET is not supported by this URL
- HTTP Status 405 - HTTP method POST/GET is not supported by this URLyi
- servlet中使用service()方法出现错误:HTTP method POST is not supported by this URL