Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 jsp 页面上为对象列表创建分页,因此我只需要遍历一系列索引。
认为
class Person { int age; String name; }
personList 是人员列表。然后你可以像这样迭代......
<c:forEach var="person" items="${personList}" varStatus="status"> <c:if test="${status.index >= startIndex && status.index < endIndex}"> ${person} </c:if> </c:forEach>