Spring mvc @ResponseBody jquery ajax调用出现如下错误:406 Not Acceptable
来源:互联网 发布:心电图数据正常值 编辑:程序博客网 时间:2024/06/05 16:37
jQuery.ajax({ type: "POST", url: "ajax/ajaxCheckLoginName.do", data: "username="+$("#name").val(), error: function(XMLHttpRequest, error, errorThrown){ alert(error); alert(errorThrown); }, success: function(response){ if(response==1){ $("#name").removeClass("extra");} }});
controller执行正常,jquery.ajax始终无法执行回调函数
加入错误查看代码:
error: function(XMLHttpRequest, error, errorThrown){ alert(error); alert(errorThrown); },
提示: Not Acceptable
The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ().
需要加入jackson依赖:
<dependency><groupId>org.codehaus.jackson</groupId><artifactId>jackson-core-asl</artifactId><version>1.8.5</version></dependency><dependency><groupId>org.codehaus.jackson</groupId><artifactId>jackson-mapper-asl</artifactId><version>1.8.5</version></dependency>
- Spring mvc @ResponseBody jquery ajax调用出现如下错误:406 Not Acceptable
- Spring mvc @ResponseBody jquery ajax调用出现如下错误:406 Not Acceptable
- spring mvc json @ResponseBody 出现406错误 not acceptable ,解决方法,亲测可行
- spring mvc 406 (Not Acceptable)
- 使用spring的@ResponseBody注解报Not Acceptable错误
- Spring Mvc @ResponseBody 返回Json信息报406(Not Acceptable)
- spring 3.2 MVC 406 Not Acceptable
- Spring MVC + JSON = 406 Not Acceptable
- spring 3.2 MVC 406 Not Acceptable 解决方法
- spring MVC HTTP406 Not Acceptable
- Spring MVC 以.html为后缀名访问获取数据,报406 Not Acceptable错误。
- 【Spring】Spring MVC 的json问题(406 Not Acceptable)
- SpringMVC ajax 请求报错:406 Not Acceptable 的解决办法 使用@ResponseBody注解
- Spring MVC 报错:Response Status: 406 (Not Acceptable)
- Spring MVC json问题(406 Not Acceptable) 解决办法
- spring4.1.4,使用ResponseBody注解返回JSON格式的数据时406 Not Acceptable错误。
- Spring mvc使用注解@ResponseBody Ajax请求返回json报406错误
- Spring SpringMvc 406 Not Acceptable
- hdu1005
- linux grep命令参数及用法详解
- ACM-Position Arrangement (解题报告)
- 23-多线程(线程间通信-示例)
- TC3.0中graphics.h链接错误的解决办法
- Spring mvc @ResponseBody jquery ajax调用出现如下错误:406 Not Acceptable
- 干嘛呢 for Android 1.0.1 --帮你找到附近一块玩的人
- Google与微软想要改进HTTP
- Java Nio通信
- Android 音量键增大减小捕捉
- Android 屏蔽HOME键
- 大并发网络服务器实现
- 云风的无锁消息队列
- Richedit使用技巧