• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to print values of a hashmap using logic:iterate

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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>
 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
follow this thread for using logic:iterate

https://coderanch.com/t/55640/Struts/logic-iterate-tag
 
reply
    Bookmark Topic Watch Topic
  • New Topic