您可以调用
varStatus.index获取当前迭代的索引,然后将其用作第二个列表的查找。
例如,如果您有两个列表
people.firstnames,则
people.lastnames可以执行以下操作:
<c:forEach var="p" items="${people.firstnames}" varStatus="status"> <tr> <td>${p}</td> <td>${people.lastnames[status.index]}</td> </tr></c:forEach>


