I hope this is the correct forum for this question.
I have a simple Spring MVC based web app.
I generate a ArrayList of Hash Maps which look like this
I use a multi action controller to return this object with my view like this[{key1=value1, key2=value2, key3=value3, key4=value4}, {key1=value1, key2=value2, key3=value3, key4=value4}]
in my viewCode:ModelAndView view = new ModelAndView("list_view"); view.addObject("list", ListObject); return view ;
Everything compiles and loads fine into tomcat . I have verified that JSTL is work correctly in tomcat. I have verified that the request contains all the right values .HTML Code:<TABLE BORDER="1"> <TH>Test</TH> <c:forEach var="current_outer" items="${Request.list}"> <c:forEach var="current_inner" items="${current_outer}"> <TR> <TD><c:out value="${current_inner.Key1}" /></TD> <TD><c:out value="${current_inner.Key2}" /></TD> <TD><c:out value="${current_inner.Key3}" /></TD> <TD><c:out value="${current_inner.Key4}" /></TD> </TR> </c:forEach> </c:forEach> </TABLE>
However I get no data rendering in the table rows .
I suspect I am not correctly referencing the object to the JSTL forEach tag.
I thought a had an iterations problem thus the outer and inner forEach loops. but even with only one forEach i get the same result
google,books and the petclinic have all failed me at this pointHTML Code:<tbody><tr><th>Test</th> </tr><tr> <td><c:out value=""></c:out></td> <td><c:out value=""></c:out></td> <td><c:out value=""></c:out></td> <td><c:out value=""></c:out></td> </tr> </tbody>
any help would be greatly appreciated.


Reply With Quote