首页 > IT职业 > IT图书 > java中在tomcat获取绝对路径的问题
使用SpsringMVC,使用restEasy调试,controller请求设置如下:
Java代码 收藏代码
@RequestMapping(value="/list",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_VALUE)
@ResponseBody
public List
List
return list;
}
请求,debug跟踪list是返回值没有问题,但是前台页面报如下错误:
Java代码 收藏代码
Response Status: 406 (Not Acceptable)
Response RAW返回值如下,(前半部分)
Xml代码 收藏代码
HTTP GET http://127.0.0.1:8080/onlineLibrary/rest/system/editTimeout/list
Host: 127.0.0.1:8080
406 Not Acceptable
Date: Sat, 17 Aug 2013 11:01:07 GMT
Server: Apache-Coyote/1.1
Content-Length: 1067
Content-Type: text/html;charset=utf-8
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/4586/viewspace-2798316/ ,如需转载,请注明出处,否则将追究法律责任。