问题描述
- Request method 'GET' not supported
- 经常遇到这个问题,现在是一个很简单的程序,HelloWeb,一个jsp
一个Controller
然后就是servlet和springMVC的配置文件,访问http://localhost:8080/HelloWeb/hello
就出现这个错误
解决方案
用fiddler去调试。你的 web 服务只支持 post,不支持get,所以直接在浏览器中看不到。
解决方案二:
在浏览器的浏览框中输入url地址访问就是get请求,而你定义方法只能为post请求,当然会有问题,把POST换成GET就可以了。
解决方案三:
Tomcat 报错信息如下:
HTTP Status 405 - Request method 'GET' not supported
type Status report
message Request method 'GET' not supported
description The specified HTTP method is not allowed for the ......
答案就在这里:Request method 'GET' not supported
解决方案四:
因为你规定了请求方法为post
时间: 2024-08-01 21:38:48