springmvc中前台页面form表单提交方法为post,但是报HTTP Status 405 - Request method 'GET' not supported
2017-12-04 14:06
916 查看
今天被一个小bug给难住了,虽然最后解决了,但是很影响心情。所以记录一下,警醒自己
在springmvc中前台JSP页面用form方法提交到后台方法中,form的method设置为post,但是总是提示HTTP Status 405 - Request method 'get' not supported 在网上找了一下方法会之后都不得要领,最后在form的action里边的方法后加“/”最后解决问题。具体原因为:不加斜杠就是在当前目录下查找方法,加斜杠就是在根目录下查找方法。
在springmvc中前台JSP页面用form方法提交到后台方法中,form的method设置为post,但是总是提示HTTP Status 405 - Request method 'get' not supported 在网上找了一下方法会之后都不得要领,最后在form的action里边的方法后加“/”最后解决问题。具体原因为:不加斜杠就是在当前目录下查找方法,加斜杠就是在根目录下查找方法。
相关文章推荐
- springMVC出现HTTP Status 405 - Request method 'GET' not supported错误的解决方法
- form表单的提交方法get()方法和post()的区别???
- SpringMVC: HTTP Status 405 - JSPs only permit GET POST or HEAD
- android利用httpclient实现post、get请求restful接口进行json和form表单数据提交等公共方法类
- SpringMVC: HTTP Status 405 - JSPs only permit GET POST or HEAD问题的解决办法。
- 表单form的提交有两种方式,一种是get的方法,一种是post 的方法
- SpringMVC中出现”HTTP Status 405 - Request method 'PUT' not supported”
- 在phpstorm中利用post方法提交form表单后,在响应页面获取不到数据的解决办法
- form表单提交的 get/post 方法(二)中文乱码的解决(1)
- form表单提交的 get/post 方法(一)区别
- 关于SpringMVC的rest的一个问题: HTTP Status 405 - JSPs only permit GET POST or HEAD.。
- spring MVC form表单提交用RequestMethod.POST报错 : Request method 'GET' not supported
- form表单提交的 get/post 方法(二)中文乱码的解决(2)
- SpringMVC: 处理PUT和DELETE请求时报错:HTTP Status 405 - JSPs only permit GET POST or HEAD.
- Form表单提交get和post方法区别
- 关于http get和form表单post提交数据大小限制
- springMVC:HTTP Status 405 - JSPs only permit GET POST or HEAD问题
- 兼容处理前台post提交form表单和get在地址栏传递中文参数
- Spring MVC HTTP Status 405 – Request method ‘POST’ not supported
- form表单提交方式 以及 HTTP 405 错误 – 方法不被允许 (Method not allowed)