프로그래밍/Java
[Java/Jsp] c:forEach index의 처음, 마지막, 카운트 값 구하기
bbuljj
2014. 4. 11. 16:00
1. c:forEach 사용 시 index의 처음, 마지막, 카운트 값
1) 처음값 first : 리턴 타입 boolean
2) 마지막값 last : 리턴 타입 boolean
3) 카운트 count : 리턴 타입 숫자
EX)
<c:forEach var="fileList" items="${fileList }" varStatus="index">
<c:if test="${!index.first }">처음 </c:if>
<c:if test="${!index.last }">마지막 </c:if>
카운트 : ${List.count}
</c:forEach>