File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to print values of a hashmap using logic:iterate

 
susmita rani
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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>
 
surendar prabu
Ranch Hand
Posts: 102
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
follow this thread for using logic:iterate

http://www.coderanch.com/t/55640/Struts/logic-iterate-tag
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic