프로그래밍/JSP
[JSTL] List결과값에 대해 Index별 접근
앗뜨거
2014. 11. 18. 23:29
728x90
<c:forEach items="${gamelist}" var="b" varStatus="status">
[${status.index}]: ${gamelist[status.index]}
<TR>
<TD>${b.gameid}</TD>
<TD>${b.displaytype}</TD>
<TD>${b.displayno}</TD>
<TD>${b.gamelink}</TD>
<td><c:if test="${b.ishidden=='T'}"><span style="color:red">Hidden</span></c:if></td>
<td>${b.lang}</td>
<td><a href="javascript:edit(${b.bid})">[Edit]</a></td>
</TR>
</c:forEach>
.index는 0부터 시작하고
.count는 1부터 시작한다.
출처 : http://jsonlee.tistory.com/52