no its not possible to iterate an user object. you can iterate only collections. because it is a single object .
iterate over the properties of an object in JSTL, not an array list or collection
Question
I have a person object and was wondering if I can use JSTL to do something like this:
<c:forEach items="${user}" var="element">
<tr>
<td>${element.firstname}</td>
<td>${element.lastname}</td>
<td>${element.age}
</tr>
</c:forEach>
everything I've found so far points to collections or an array list. user is stored as a session variable.
Is this possible?
Many thanks.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow