c:forEach index

/ Published in: Java
Save to your folder(s)

Copy this code and paste it in your HTML
  1. <c:forEach items="${list}" var="item" varStatus="status">
  2. <c:out value="item"/>
  3. <c:out value="${status.index}"/>
  4. <c:out value="${status.count}"/>
  5. <c:out value="${status.first}"/>
  6. <c:out value="${status.last}"/><br/>
  7. </c:forEach>

URL: http://download.oracle.com/javaee/5/jstl/1.1/docs/tlddocs/c/forEach.html

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.