• 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

how to iterate a collection of data objects using <logic:iterate> and <bean:write>

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,I am trying to iterate a collection of objects.These objects contains 5 fields to be displayed.
In action class,i put the collection as

And in jsp ,iterate as



When i run the application no error is displayed ,but ,result is,

[object][object][object][object][object]

displayed.

How can we get the value stored inside the object that is in a collection.

 
Sheriff
Posts: 9708
43
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well this is a strange sort of behavior. First of all I am assuming that you have getter properties for all your properties in RegD class. Then one thing that I'm not clear on is that why are you using a list when there is only one instance of RegD class in the list. Maybe you have shown some incomplete code.

Also by looking at the ouput, I can only think of the toString method of AbstractCollection class. I know I may be wrong on this. But there is no way that I know of when the code should display that kind of output. Maybe there is something wrong with your action and there is a List as elements in your list. Still I'm not sure how can that sort of output can come...
reply
    Bookmark Topic Watch Topic
  • New Topic