(6) HTTP Status 405 - HTTP method POST is not supported by this URL
来源:互联网 发布:织撒网数据参数 编辑:程序博客网 时间:2024/06/06 03:15
我在做一个投票系统的时候在页面点击投票提交按钮之后,提交给Servlet之后就出现了 “ HTTP Status 405 - HTTP method POST is not supported by this URL ”的错误,找了很久,才发现我提交方式是post,但是Servlet中 没有写doPost,可能是在用IDE生成的时候选错了,于是乎将doPost方法写上,就解决了这个问题。
我还想看看这个问题到底有什么错误,于是乎上网查找了相关错误的信息,发现有几种方式也会引起这种错误的做法。
① 在serlvet中跳转没有用外跳(response.sendRedirect()),
把request.getRequestDispatcher("FindByIdServlet?id="+commentPostId).forward(request, response);
改成response.sendRedirect("FindByIdServlet?id="+commentPostId);详情见:http://blog.csdn.net/xiangsuixinsheng/article/details/6594776
也可以参考:http://hi.baidu.com/lunaczp/item/d807e93947dd32e82e8ec2f9
0 0
- (6) 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 POST is not supported by this URL
- HTTP Status 405 -- HTTP method POST is not supported by this URL
- HTTP Status 405 - HTTP method POST is not supported by this URL
- 解决HTTP Status 405 - HTTP method POST is not supported by this URL 详解方案
- HTTP Status 405 - HTTP method POST is not supported by this URL
- 关于解决HTTP Status 405 - HTTP method POST is not supported by this URL方法之一
- HTTP Status 405 - HTTP method POST is not supported by this URL
- HTTP method POST is not supported by this URL
- HTTP method POST is not supported by this URL
- HTTP method POST is not supported by this URL
- HTTP method POST is not supported by this URL解决方案
- HTTP method POST is not supported by this URL解决方案
- HTTP Status 405 - HTTP method POST/GET is not supported by this URLyi
- 访问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
- Python学习笔记(七)----Python 循环语句
- 用位运算来处理集合中的交,并,补(对称差)运算
- LatexDraw画的图要用xelatex来编译,否则有<recently read> \c@lor@to@ps
- 修改ubuntu字符编码 (以修改为GBK为例,其它修改可以参照前两篇文章修改)
- 最小操作次数的简易版【解】--英雄会
- (6) HTTP Status 405 - HTTP method POST is not supported by this URL
- 第十七周-项目二(1)字符串str1与str2的链接。(数组法)
- 蓝桥杯:基础练习 数列排序
- Codeblocks 12.11安装笔记
- 第十六周 项目4--有相同数字吗?
- 3个国外报表工具
- Windows上配置iPhone开发环境
- php学习之会话应用cookie和session
- CSS颜色大全