主题 : 报不支持post方法的错误
级别: 解元
UID: 23338
积分:260 加为好友
威望: 0 精华: 0
主题:24 回复:81
注册时间:2011-09-03
在线时长:0
1#   发表于:2012-02-22 15:43:20  IP:202.84.*.*
错误:Servlet.service() for servlet JeeCmsFront threw exception
org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported
at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter$ServletHandlerMethodResolver.resolveHandlerMethod(AnnotationMethodHandlerAdapter.java:623)

js里面
function findAriticle(id)
{
 $.ajax({
type: "post",
      url: "findAriticle.jspx?id="+id,
      cache: false,
      datatype:"json",
      success: function(json){
      var bToObj=JSON.parse(json);
      var obj=document.getElementById("contentTxt");
     alert(bToObj);
  obj.innerHTML+=bToObj;
}});
}
action 里面
@RequestMapping(value = "/findAriticle*.jspx", method = RequestMethod.POST)
public void findAriticle(HttpServletRequest request,
HttpServletResponse response, ModelMap model,String id){

为什么会出现 org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported

怎么修改?
级别: 总版主
UID: 10736
积分:148511 加为好友
威望: 205 精华: 42
主题:287 回复:126215
注册时间:2010-09-08
在线时长:18
2#   发表于:2012-02-22 16:01:57  IP:115.175.*.*
在action 里面修改
路漫漫其修远兮,吾将上下而求索!
级别: 解元
UID: 23338
积分:260 加为好友
威望: 0 精华: 0
主题:24 回复:81
注册时间:2011-09-03
在线时长:0
3#   发表于:2012-02-22 16:02:37  IP:202.84.*.*
在action 里面修改什么?
  哪个地方错了  望详解
级别: 总版主
UID: 10736
积分:148511 加为好友
威望: 205 精华: 42
主题:287 回复:126215
注册时间:2010-09-08
在线时长:18
4#   发表于:2012-02-22 16:04:43  IP:115.175.*.*
我们是不提供开发支持的
路漫漫其修远兮,吾将上下而求索!
1 共1页