How to convert below for loop to a jstl foreach:
for(int i = 0 ; i<=21; i+=3){
  // print foo
}
This is what I have so far:
<c:forEach varStatus="loop" begin="0" end="21">
  // display foo
</c:forEach>
                Acoording to jstl you should try:
<c:forEach begin="0" end="21" step="3" varStatus="loop">
    <c:out value="${loop.count}"/>
</c:forEach>
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With