Bug 13016 - bug in forEach tag
Summary: bug in forEach tag
Status: RESOLVED WORKSFORME
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.0
Hardware: Sun Linux
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-26 07:55 UTC by Peter Illes
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Illes 2002-09-26 07:55:14 UTC
The forEach tag is wrong when iterating in 'fixed number of times' mode. When
'begin' parameter equals the 'end' parameter, it doesn't evaluate at all. When
'end' is 'begin' + 1, it iterates twice as should iterate towards 'end' inclusive.
This means it's not possible to iterate once.
Comment 1 Shawn Bayern 2002-09-26 13:22:19 UTC
I can't replicate the problem.  Consider the following examples:

<c:forEach begin="0" end="0">
 Loop! <br />
</c:forEach>

<c:forEach begin="0" end="1">
 Loop! <br />
</c:forEach>

For me, the first loop executes once, and the second executes twice.

If you're still having a problem, please be more specific; post an entire page 
of input and output, and specify the container that you're running in.