Iterating over hashmap in JSP in struts application
Posted
by Rozer
on Stack Overflow
See other posts from Stack Overflow
or by Rozer
Published on 2010-06-15T10:52:18Z
Indexed on
2010/06/15
11:22 UTC
Read the original article
Hit count: 182
I have a HashMap
object that I am getting on a JSP page.
HashMap<Integer,Gift_product> gift_hm = new HashMap<Integer,Gift_product>();
gift_hm.put(17,new Gift_product("doll",67));
Now I need to iterate this and display content on JSP.
The Gift_product
class contains two fields: name
and price
.
JSP output should be
serial no. product name price
17 Doll 67
How can I achieve it?
© Stack Overflow or respective owner