This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes getting value from hashmap in JSP using struts tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "getting value from hashmap in JSP using struts tag" Watch "getting value from hashmap in JSP using struts tag" New topic
Author

getting value from hashmap in JSP using struts tag

Hd Desai
Ranch Hand

Joined: Aug 04, 2003
Posts: 65
Hi,

I have a hashmap which has object in its value, I want to display value for the key passed in JSP.

E.g HashMap is hm and it has object obj which is like

class Obj{
private string id;
private String name;

getter setter for these two.....
}
hm.put ("1", obj)
hm.put("2",obj)

Now in JSP I want to display name for the object with key 1 and key 2.

When I try like this <html:text property="hm.1" /> it gives object, but I want to display name in object with key 1.....

Please suggest solution for this...

Thanks in advance.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: getting value from hashmap in JSP using struts tag
 
jQuery in Action, 3rd edition