I am using the Table class (specifically the HashBasedTable) from the Guava library (formerly Google Collections). I am using Spring MVC and after packaging my beans into this Table in my controller class, I want to iterate over it on my JSP page.
How would I go about doing that? Below is a simplified version of what I’d been trying.
<c:forEach var="rowElement" items="${resultsCL.rowKeySet}">
<c:forEach var="columnElement" items="${resultsCL.columnKeySet}">
${resultsCL.get(rowElement, columnElement)}">
</c:forEach>
</c:forEach>
rowKeySetandcolumnKeySetare not getter-methods, so you can’t call them withbean.propertysyntax. You need to invoke the methods. I.e.resultCL.rowKeySet()andresultCL.columnKeySet()Note that this may not work with older versions of EL that do not support method invocations.