File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes how to print values of  a hashmap using logic:iterate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "how to print values of  a hashmap using logic:iterate" Watch "how to print values of  a hashmap using logic:iterate" New topic
Author

how to print values of a hashmap using logic:iterate

susmita rani
Greenhorn

Joined: Feb 25, 2007
Posts: 1
Hi ,
i am new to struts.
i have to print the values in a hashmap in a jsp using logic:iterate.
i have print the hashmap as two columns in which both key and the value should be printed.
how to print the key in as jsp?
thanks in advance.
dennis du
Ranch Hand

Joined: Dec 31, 2004
Posts: 59
hi ,

In fact , I prefer using JSTL to replace the logic tags from struts.

in JSTL, you can use <c:forEach var="entry" items=${HashMapObject}">
Key=${entry.key}
Value = ${entry.value}
</c:forEach>


-------------------------------<br />OCP 9i <br />SCJP/SCJD/SCWCD(92%)/SCDJWS<br />XML(IBM Test 141)<br />Who is the next?SCBCD<br />SCBCD/CCNA/CCNP/PMP<br />not sure
surendar prabu
Ranch Hand

Joined: Jul 24, 2006
Posts: 102
follow this thread for using logic:iterate

http://www.coderanch.com/t/55640/Struts/logic-iterate-tag


SCJP 1.4
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to print values of a hashmap using logic:iterate
 
Similar Threads
Collection
Displaying Values in JSP Page using Struts
access hashmap in jsp
Displaying values in JSP using Struts Tag
Nested HashMap in logic:iterate