0

在 bean“Result”中,设置了 arrayList“tempList”。然后将这个 bean 设置到会话中。我必须在 JSP 页面上获取 arrayList 元素。

我没有得到如何获取其元素的方法。

请建议。

4

1 回答 1

1

使用 JSTL <c:forEach>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
...
 <c:forEach items="${youSessionAttributeName}" var="i">
    Item <c:out value="${i}"/><p>
 </c:forEach>
于 2013-01-23T16:12:02.930 回答