1

How can i break or continue the for each loop in JSP

<c:set var="count" value="0" scope="page" />

Here In for each loop

<c:set var="count" value="${count + 1}" scope="page" />
<c:choose>
    <c:when test="count == 2" > <break> </c:when>
    <c:otherwise> <continue> </c:otherwise>
</c:choose>

It doesn't work here.....Please help.....Thank you

Adam Konieska
  • 2,805
  • 3
  • 14
  • 27
Silvia
  • 95
  • 1
  • 2
  • 9
  • There is no break or continue in `foreach` loop. Refer here http://stackoverflow.com/questions/7578420/jstl-continue-break-inside-foreach for a workaround – vjy Jun 13 '14 at 10:19
  • 2
    you can use `` – Braj Jun 13 '14 at 11:37
  • Possible duplicate of [How to evaluate a scriptlet variable in EL?](http://stackoverflow.com/questions/5965812/how-to-evaluate-a-scriptlet-variable-in-el) – Paul Sweatte Jul 20 '16 at 22:13

0 Answers0