Jsp 如何使用JSTL迭代列表
我有一个这样的列表,所有用户的问题都已分配Jsp 如何使用JSTL迭代列表,jsp,jstl,Jsp,Jstl,我有一个这样的列表,所有用户的问题都已分配 userId issueNo issue_desc comments amit t12334 login not happening login via test user not happening amit t1666 session is not cleared after logout session is not c
userId issueNo issue_desc comments
amit t12334 login not happening login via test user not happening
amit t1666 session is not cleared after logout session is not cleared
yash st5436 Transaction Logs check transaction logs
如何使用JSTL实现以下功能
amit
issueNo issue_desc comments
12334 login not happening login via test user not happening
t1666 session is not cleared after logout session is not cleared
yash
issueNo issue_desc comments
st5436 Transaction Logs check transaction logs
或者有没有更好的方式显示此信息?1)按“用户ID”对用户列表进行排序2) 使用下一个循环:
<table>
<thead>
<th>issueNo</th>
<th>issue_desc</th>
<th>comments</th>
</thead>
<tbody>
<c:forEach items="${users}" var="user">
<c:if test="${empty prevUser or user.userId != prevUser.userId}">
<tr>
<td colspan='3' align='left'><c:out value="${user.userId}"/></td>
</tr>
</c:if>
<tr>
<td><c:out value="${user.issueNo}"/></td>
<td><c:out value="${user.issue_desc}"/></td>
<td><c:out value="${user.comments}"/></td>
</tr>
<c:set var="prevUser" value="${user}" />
</c:forEach>
</tbody>
</table>
伊塞诺
问题描述
评论
嘿,它成功了。。。非常感谢你的朋友!!!只需相应地更改数组索引!!!