본문 바로가기

개발하자/JSP&Servlet

EL)varStatus속성

<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String[] array={"aa","bb","cc","dd","ee","ff","gg"};
%>
<c:forEach var="str" items="<%=array%>" varStatus="a" begin="2" end="6" step="2">
 ${a.index}:${a.count}:${a.begin}:${a.end}:${a.step}:${a.first}:${a.last}:${a.current}:${str} <br/>
</c:forEach>