java-Request method 'GET' not supported

问题描述

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

java-Request method 'GET' not supported的相关文章

控制器-第一次加载成功,每次刷新都会报Request method 'GET' not supported

问题描述 第一次加载成功,每次刷新都会报Request method 'GET' not supported .when('/glysz_glylb', {//管理员信息模版 templateUrl : '/sysmgr/user/list.view', controller : 'mainController' }) --这是JS的跳转路径 @RequestMapping("user/list.view") @RequiresPermissions("user:list&q

Spring MVC exception - Invoking request method resulted in exception : public static native long java.lang.System.currentTimeMillis()

最近在线上系统发现下面的异常信息: 2014-10-11 11:14:09 ERROR [org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerExceptionResolver.doResolveException(143)]- Invoking request method resulted in exception : public static native long java.lang.System.

请求-求助啊!!var id=$(this).attr('id'); 和 $(this).empty(); 怎么结合

问题描述 求助啊!!var id=$(this).attr('id'); 和 $(this).empty(); 怎么结合 已经获得各个id ... $(document).ready(function(){ $('div').click(function(){ var id=$(this).attr('id'); alert(id); //可以得到某个id的值 var aurl=""<%=basePath%>/colV.action""; var ada

javascript-jquery如何设置一个动态创建的 $(&amp;amp;#39;#&amp;amp;#39;).append(&amp;amp;#39;&amp;amp;#39;)中的ID?并利用它

问题描述 jquery如何设置一个动态创建的 $('#').append('')中的ID?并利用它 就比如像这样的: <script type="text/javascript"> var number=0; function next(){ $('#showdata').append('<input class="number_showdata" id="showdataid'+number+'" type="tex

org.springframework.web.HttpRequestMethodNotSupportedException: Request method

问题描述 jap代码: <a href="/manager/message/{2}.html"><span>全部会员</span></a> <a href="/manager/message/{1}.html"><span>全部研发会员</span></a> <a href="/manager/message/{0}.html"><s

JMeter入门(4):Java Request实例

目的:对Java程序进行测试: 一.核心步骤 1.创建一个Java工程: 2.将JMeter的lib目录下的jar文件添加进此工程的Build Path: 3.创建一个类并实现JavaSamplerClient接口或继承AbstractJavaSamplerClient,并重写: public Arguments getDefaultParameters():设置可用参数及的默认值: public void setupTest(JavaSamplerContext arg0):每个线程测试前执行

java的method怎么返回 求大神教下

问题描述 java的method怎么返回 求大神教下 import java.util.Scanner; import java.util.Arrays; public class Anagram { // Returns a copy of the string in sorted order. public static String sort(String s) { char [] sortString = s.toCharArray(); Arrays.sort(sortString);

【c3p0】报错:java.io.FileNotFoundException: Resource not found at path &amp;#39;/mchange-log.properties&amp;#39;

  配置项目启动初始,报错如下: 1 java.io.FileNotFoundException: Resource not found at path '/mchange-commons.properties'. 2 at com.mchange.v2.cfg.BasicPropertiesConfigSource.propertiesFromSource(BasicPropertiesConfigSource.java:64) 3 at com.mchange.v2.cfg.BasicMul

java类的问题-java题,将该字符串每个字符与&amp;amp;#39;U&amp;amp;#39;之差的绝对值的升序排序

问题描述 java题,将该字符串每个字符与'U'之差的绝对值的升序排序 输入一组字符串,将该字符串每个字符与'U'之差的绝对值的升序排序.在线等!!? 解决方案 每个字符都减去同一个字符跟不减不一样么?没有必要啊.直接排序即可. 解决方案二: 首先,按照我的一贯观点,这种问题和编程语言无关,和编程语言无关,和编程语言无关.重要的事情说三遍! 设计重点:1.与U的差值存储;2.升序排序. 已知的排序算法相当多,不过在本问题情形下,需要稍作变通. 给出一个简单方案吧:给定字符串Char[];比较差值