I am trying this but its going to else part always
<c:forEach items="${records}" var="field" varStatus="counter">
<c:choose>
<c:when test="${counter.count mod 2 == 0}">
<div class="classEven">
</c:when>
<c:otherwise>
<div class="classOdd">
</c:otherwise>
</c:choose>
sample text here
</div>
</c:forEach>
What’s wrong with this?
You could also use
${counter.count % 2 == 0}