문제

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.

도움이 되었습니까?

해결책

no its not possible to iterate an user object. you can iterate only collections. because it is a single object .

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top