how to break out of foreach jstl 1

how to break out of foreach jstl


    
        <<>>
    
    

someType is not aaa or AAA

Here is what the above code is Doing:
1. The <c:forEach> tag is iterating over a list of objects.
2. The <c:if> tag is checking to see if the someType property of the current object is equal to aaa or AAA.
3. If the <c:if> tag evaluates to true, then I want to skip the rest of the code in the <c:forEach> tag and move on to the next object in the list.
I know that I can use <c:if> to check for a condition and then execute some code if the condition is true. But I don’t know how to skip the rest of the code in the <c:forEach> tag and move on to the next object in the list.
I’ve tried using <c:continue> but that doesn’t work. I’ve also tried using <c:set> to set a variable to true and then using <c:if> to check for that variable and then using <c:continue> but that doesn’t work either.
I’ve also tried using <c:choose> and <c:when> but that doesn’t work either.
I’ve also tried using <c:set> to set a variable to true and then using <c:if> to check for that variable and then using <c:remove> but that doesn’t work either.
I’ve also tried using <c:set> to set a variable to true and then using <c:if> to check for that variable and then using <c:remove var="list" scope="page"/> but that doesn’t work either.
I’ve also tried using <c:set> to set a variable to true and then using <c:if> to check for that variable and then using <c:remove var="list" scope="request"/> but that doesn’t work either.
I’ve also tried using <c:set> to set a variable to true and then using <c:if> to check for that variable and then using <c:remove var="list" scope="session"/> but that doesn’t work either.
I’ve also tried using <c:set> to set a variable to true and then using <c:if> to check for that variable and then using <c:remove var="list" scope="application"/> but that doesn’t work either.
I’ve also tried using

Similar Posts