Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to print values of a hashmap using logic:iterate

 
susmita rani
Greenhorn
Posts: 1
  • 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
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic