Bug 31047

Summary: c:forEach - step does not accept negative values
Product: Taglibs Reporter: Seth Fitzsimmons <seth>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Severity: enhancement    
Priority: P3    
Version: 1.1.0   
Target Milestone: ---   
Hardware: All   
OS: other   

Description Seth Fitzsimmons 2004-09-03 15:00:27 UTC
<c:forEach begin="5" end="1" step="-1" var="x">...</c:forEach> complains about
step being <= 0.

How should countdowns be handled if step cannot be negative?
Comment 1 Kris Schneider 2004-09-03 15:17:40 UTC
Marked as an enhancement since the JSTL 1.1 Spec. states:

- If specified, begin must be >= 0.
- If end is specified and it is less than begin, the loop is simply not executed.
- If specified, step must be >= 1
Comment 2 Henri Yandell 2006-12-13 12:54:20 UTC
I've reported this to the 1.2 RI:


We won't be fixing it unless the spec changes.