<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <c:set var="val" value="10" /> <c:if test="${val >1}" var="flag" > this is true <br/> </c:if> <c:out value="${flag}" /> <c:forEach items="one,two,three" varStatus="seq"> <c:out value="${seq.count}" /> <br/> <c:if test="${seq.count%2==0}" > Even <br/> </c:if> </c:forEach>