• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java object is not rendered in jsp using json and spring framework.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm new to Json framework. I'm unable to display response from the server. where as my client is hitting the controller method.

please find the jar file details that I'm using in the spring mvc.
spring-beans-4.0.6.jar
spring-webmvc-4.0.6.jar
jackson-core.2.2.3.jar
jackson-core-asl.1.9.7.jar
jackson-databid.2.4.3.jar
jackson-mapper-asl.1.9.12.jar



Here is the html snippet and jquery code


When I tried to hit findAgents.html in the browser it is hitting controller method sucessfully and I'm getting the 406 error as shown below.
The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ().

Request to help me in making this code to work.

Thanks & Regards,
Kiran
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Kiran,
Your Java method is returning a list rather than a JSON String. This code example shows one way to do that with Jackson.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic