-1

I am using the following code,

The xxx - is the LinkedHashMap

The yyy - is the HashMap

When I iterate the yyy, the following error occurred. Can you please anypone explain about this error and what is the solution for this.

<c:forEach var="aaa" items="${xxx}">
<c:set var="yyy" value="${projects.key}"/>
<c:forEach var="test" items="${yyy}">                                                                 
</c:forEach>
</c:forEach>
Abhishek Chaubey
  • 2,960
  • 1
  • 17
  • 24

1 Answers1

0

To iterate your LinkedHashMap xxx, you need iterate its key and value

  <c:forEach var="row" items="${xxx}"> 
               ${row.key}
               ${row.value}            
         </c:forEach>      
   </c:forEach>

you neednt assign it to the variable to iterate its values as jstl provides you the way

Santhosh
  • 8,181
  • 4
  • 29
  • 56