POSTS

Spring, Java - @ResponseBody(JSON) request returning Internal Server Error 500

Problem:

Requests to return an JSON object returns Internal Server Error 500

Solution:

Controller:

@RequestMapping(method = RequestMethod.GET, value = "/get")
public @ResponseBody Question getQuestionsAjax() {
  (...)
  return (...);
}

mvc-dispatcher-servlet.java:

mvc:annotation-driven/

Pom.xml

org.codehaus.jackson jackson-mapper-asl 1.9.0

org.codehaus.jackson jackson-core-asl 1.9.0

@RequestMapping(method = RequestMethod.GET, value = "/get")  
  public @ResponseBody Question getQuestionsAjax() {  
    (...)  
  return (...);  
 }