Iterating over a HashMap with JSTL, always getting last Object
Posted
by hkansal
on Stack Overflow
See other posts from Stack Overflow
or by hkansal
Published on 2010-06-16T10:16:35Z
Indexed on
2010/06/16
10:22 UTC
Read the original article
Hit count: 376
Hello,
I have a Map, which I tried to iterate over with JSTL. Somehow I could not accomplish even this basic task. I also referred the questions here and here, but that is what I am already doing, still no success.
What I tried to do was:
<c:forEach items="${myMap}" var="myEntry">
${myEntry.key} + ${myEntry.value}
</c:forEach>
But I always get the last object.
Maybe I am missing something trivial, please advise.
Thank You
© Stack Overflow or respective owner