Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to iterate thru TreeMap using interator in struts2

 
Jyothsna Panchagnula
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I have the following fragment of code in java


Employee Class has name , age , designation , department , date of joining.
in jsp I am populating like this


but I am seeing the object information instead of employee

Can any one tell me how to iterate through Employee map using iterator in struts2?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The object pushed onto the stack is a MapEntry, according to the entrySet() Javadocs. A MapEntry has "key" and "value" properties. The "value" property is the object stored in the map. You're printing the "value" property--I'm not sure what you expected.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic