aspose file tools*
The moose likes Struts and the fly likes How to iterate thru TreeMap using interator in struts2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to iterate thru TreeMap using interator in struts2" Watch "How to iterate thru TreeMap using interator in struts2" New topic
Author

How to iterate thru TreeMap using interator in struts2

Jyothsna Panchagnula
Ranch Hand

Joined: Jul 11, 2005
Posts: 113

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

Joined: Sep 29, 2008
Posts: 12617

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to iterate thru TreeMap using interator in struts2