0

I have a SortedMap which I'm populating in my service classes, I want to display all the values stored in the map in a sorted order. How can I do that using EL (Expression language). Also how can I access the keys?

Thanks for the help.

Ravi.

Drew Wills
  • 8,408
  • 4
  • 29
  • 40
Ravi
  • 7,939
  • 14
  • 40
  • 43

1 Answers1

3

So:

<ol>
  <c:forEach items="${myMap}" var="item">
    <li><c:out value="${item.key}"/>=<c:out value="${item.value}"/></li>
  </c:forEach>
</ol>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
Drew Wills
  • 8,408
  • 4
  • 29
  • 40