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 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 method GET is not supported by this URL(转)的更多相关文章
- 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()方法未覆盖. 应写 ...
- 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 ...
- HTTP Status 405 - HTTP method GET is not supported by this URL
问题概述: 借助MyEclipse直接建立了一个Servlet类,每次访问这个Servlet都能访问.可自己建立一个Servlet为什么总提示:HTTP Status 405 - HTTP metho ...
- 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 ...
- HTTP method GET is not supported by this URL
Servlet eroor:HTTP method GET is not supported by this URL 错误提示: type: Status report message: HTTP m ...
- HTTP method POST is not supported by this URL
修改提交页面的提交方式,修改method为get(在index页面中html标签 method="get") 示例代码修改后的代码: <form action="s ...
- 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 ...
- HTTP Status 405 - HTTP method POST is not supported by this URL
出现这个问题, 1.在servlet中没有调用post()方法引起的 2.在serlvet中跳转没有用外跳(response.sendRedirect()) 我的是因为第一种,是没有写dopost() ...
- Request method 'PUT'/ 'POST' not supported
起因 在项目中遇到需要进行crud操作的功能,用的是Springboot+MybatisPlus+MySQL+AVue,在通过postman测试接口正确性时遇到此错误. 排查过程 因为项目运行是没问题 ...
随机推荐
- oracle_面试题
SELECT a.name ,IFNULL(b.name,"BOSS") FROM boss a LEFT JOIN boss b ON a.MANAGER_ID = b.ID 员 ...
- cocos2d 缓存池 对象的再利用
1.简单的叙述说明池 例如,我们知道,游戏的游戏类型跑酷,游戏元素都在不断重复.游戏的内容将继续从屏幕右侧的创建,当元件在屏幕的左侧的,将消失.假设不变new 对象.release 对象 性能影响.怎 ...
- jquery密码强度检测
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 类别sort使用排序
2129: 船上的第二次测试第三个问题 Time Limit: 5 Sec Memory Limit: 128 MB Submit: 243 Solved: 74 [Submit][id=2129 ...
- Struts2 整合jQuery实现Ajax功能(2)
1.1.1 Action利用struts2-json-plugin-X.X.X.jar响应Json格式信息: 1. function removerecordbyid(recordid) ...
- Android游戏开发研究与主角在地图滚动
让人感动的地图过程平滑滚动 玩过rpg朋友应该都知道RPG的游戏地图一般都比較大 今天我和大家分享一下在RPG游戏中怎样来处理超出手机屏幕大小的游戏地图. 如图所看到的为程序效果 ...
- Socket 学习(三).3 TCP UDP 图解
TCP 照我的理解就是 发送 和接收 不能用 同一个端口. 下面是 UDP的: 我的理解是 tcp 是 连接模式,udp 是断开模式.这里有2条连接线,就是跟 上面 Socket 的最大区别,udpC ...
- 快速构建Windows 8风格应用2-创建调试应用
原文:快速构建Windows 8风格应用2-创建调试应用 本篇博文主要介绍的是创建应用时可以选择哪些模版,生成默认的Windows 8风格应用解决方案中含哪些文件,最后是如何调试Windows 8风格 ...
- Codeforces#277 C,E
C. Palindrome Transformation time limit per test 1 second memory limit per test 256 megabytes input ...
- C#如何获得系统时间
原文:C#如何获得系统时间 C#获取时间,日期 //C#里内置的DateTime基本上都可以实现这些功能,巧用DateTime会使你处理这些事来变轻松多了 //今天 ...