I am passing a ViewBean into a
JSP page.
The ViewBean Contains a Map
The Key for the Map is a
String The Value for the Map is an ArrayList of Car objects
The viewBean is accessed using useBean.
<jsp:useBean id="viewBean"
class="com.whatever.MyViewBean"
scope="request" />
<c:forEach var="mapEntry" items="${viewBean.map}">
<c:set var="theKey" value="${mapEntry.key}" />
<c:set var="anArrayList" value="${mapEntry.value}" />
<c:forEach var="car" items="${anArrayList}" >
.
.
.
</c:forEach>
</c:forEach>
I am receiving an exception at this point: "javax.servlet.ServletException: Don't know how to iterate over supplied "items" in <forEach>"
I believe that the problem is the "anArrayList" and that it doesn't know that it is an ArrayList that can be iterated over.
Any Ideas what the problem is???