Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
  • 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Devaka Cooray
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Tim Holloway
  • Claude Moore
  • Stephan van Hulst
  • Winston Gutkowski
  • Carey Brown
  • Frits Walraven

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

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?

output:  undefined

Action class



output at Action class :

Posts: 63454
  • 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.
30 seconds to difuse a loaf of bread ... here, use this tiny ad:
Become a Java guru with IntelliJ IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!