Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

How to display json object on jsp page using javascript function?  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using struts 2 and spring for this. I have a Action class, a Model class, DaoImpl class. regCase, totalCase etc. are defined in Model and are getting values from database through DaoImpl. When I'm printing those values on Actin class, it is displaying correct values, means all is fine till Action class but when I run it, the form is displaying values as 0. That is, something is wrong with how I'm displaying them on jsp, the values on jsp are coming as undefined. I've converted my Model into json in Action class but how to display this on jsp in below function?
JSP :



output:  undefined


Action class


Model:


DaoImpl:

 
output at Action class :

 
Marshal
Posts: 64496
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

This discussion would fit better in some of our other fora, so I shall move you.
 
Uh oh, we're definitely being carded. Here, show him this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!