Servlet eroor:HTTP method GET is not supported by this URL
错误提示:
type: Status report
message: HTTP method GET is not supported by this URL
description: The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).
原因:
1,继承自HttpServlet的Servlet没有重写对于请求和响应的处理方法:doGet或doPost等方法;默认调用父类的doGet或doPost等方法;
2,父类HttpServlet的doGet或doPost等方法覆盖了你重写的doGet或doPost等方法;
不管是1或2,父类HttpServlet的doGet或doPost等方法的默认实现是返回状态代码为405的HTTP错误表示对于指定资源的请求方法不被允许。
解决方法:
1,子类重写doGet或doPost等方法;
2,在你扩展的Servlert中重写doGet或doPost等方法来处理请求和响应时 不要调用父类HttpServlet的doGet或doPost等方法,即去掉super.doGet(request, response)和super.doPost(request, response);

谢谢@http://blog.csdn.net/qfs_v/article/details/2545168

HTTP method GET is not supported by this URL的更多相关文章

  1. 405 HTTP method GET is not supported by this URL

    孙鑫java web开发详解P285里面提交Get网站弹出提示405 HTTP method GET is not supported by this URL 原因父类doGet()方法未覆盖. 应写 ...

  2. HTTP method GET is not supported by this URL(转)

    源地址:http://blog.csdn.net/qfs_v/article/details/2545168 Servlet  eroor:HTTP method GET is not support ...

  3. doPost或doGet调用出错(状态代码为405) : HTTP method GET is not supported by this URL

    最近做servlet发现了个问题,解决办法记下来: Servlet  eroor:HTTP method GET is not supported by this URL 错误提示: type: St ...

  4. HTTP Status 405 - HTTP method GET is not supported by this URL

    问题概述: 借助MyEclipse直接建立了一个Servlet类,每次访问这个Servlet都能访问.可自己建立一个Servlet为什么总提示:HTTP Status 405 - HTTP metho ...

  5. tomcat报错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 原因是:1.继承自Httpserv ...

  6. HTTP method POST is not supported by this URL

    修改提交页面的提交方式,修改method为get(在index页面中html标签 method="get") 示例代码修改后的代码: <form action="s ...

  7. jsp HTTP Status 405 - HTTP method GET is not supported by this URL

    package myservlet.control; import java.io.IOException; import java.io.PrintWriter; import javax.serv ...

  8. HTTP Status 405 - HTTP method POST is not supported by this URL

    出现这个问题, 1.在servlet中没有调用post()方法引起的 2.在serlvet中跳转没有用外跳(response.sendRedirect()) 我的是因为第一种,是没有写dopost() ...

  9. Request method 'PUT'/ 'POST' not supported

    起因 在项目中遇到需要进行crud操作的功能,用的是Springboot+MybatisPlus+MySQL+AVue,在通过postman测试接口正确性时遇到此错误. 排查过程 因为项目运行是没问题 ...

随机推荐

  1. http://www.cnblogs.com/sealedbook/p/6194047.html

    http://www.cnblogs.com/sealedbook/p/6194047.html

  2. CDH 安装的博客地址记录

    1. 集群环境配置 https://www.cnblogs.com/yinzhengjie/articles/11019333.html 2. 二进制方法安装 https://www.cnblogs. ...

  3. ubuntu系统开机优化参数

    date : 2019-06-20   14:34:48 author: headsen chen 临时设置: ulimit -n 1000000 永久设置: vim /etc/security/li ...

  4. android中SpannableString之富文本显示效果

    SpannableString其实和String一样,都是一种字符串类型,SpannableString可以直接作为TextView的显示文本,不同的是SpannableString可以通过使用其方法 ...

  5. 016-mac下ps

    参看 http://www.ddooo.com/softdown/65448.htm#dltab 1.下载 安装运行:断网后,双击Photoshop CS6.dmg进入安装界面 2.安装提示:安装程序 ...

  6. Access-Control-Max-Age是什么?

    Access-Control-Max-Age是什么   答: 浏览器的同源策略,就是出于安全考虑,浏览器会限制从脚本发起的跨域HTTP请求(比如异步请求GET, POST, PUT, DELETE, ...

  7. 【创业】2B创业历程

    http://www.woshipm.com/chuangye/2800111.html http://www.woshipm.com/chuangye/2803240.html http://www ...

  8. (九)UML之活动图

    一.概念 二. 在Rational rose 中画活动图 2.1 创建Activity Diagram 2.2 画图

  9. 【Leetcode_easy】671. Second Minimum Node In a Binary Tree

    problem 671. Second Minimum Node In a Binary Tree 参考 1. Leetcode_easy_671. Second Minimum Node In a ...

  10. Docker Swarm 集群(十七)

    目录 一.Docker Swarm 概念 1.集群 2.Docker Swarm 3.重要概念 swarm node service 二.创建 Swarm 集群 1.环境准备 2.创建 swarm 3 ...