Win a copy of Head First Go this week in the Go 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
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
Bartenders:
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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: 63496
207
  • 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.
 
You get good luck from rubbing the belly of a tiny ad:
Become a Java guru with IntelliJ IDEA
https://www.jetbrains.com/idea/
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!