Upon trying to get my response in JSON using Spring 3.x, I get the 406 error \"The resource identified by this request is only capable
Thank you for sharing you experience.I experienced the same problem and it works for me using configuration as show below:
Spring MVC Config File:
Model class : Country.java
private Integer countryId;
private String name;
//public setters and getters
Controller Method:
@RequestMapping(value = "/get_country_json",method = RequestMethod.GET)
@ResponseBody
public Country getCountry()
Deployment Descriptor(web.xml)
dispatcher
org.springframework.web.servlet.DispatcherServlet
1
dispatcher
*.htm
URL Requested to call controller method: /SpringCURDApp/get_country_json.htm
I hope this can help someone.