Bug 47944 - JSTL <c:forEach> only accepts constant attribute values
Summary: JSTL <c:forEach> only accepts constant attribute values
Status: RESOLVED DUPLICATE of bug 45953
Alias: None
Product: Tomcat 6
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 6.0.18
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: default
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2009-10-06 04:55 UTC by John Marks
Modified: 2009-10-08 04:54 UTC (History)
0 users

Reproduces the above problem (1005 bytes, application/octet-stream)
2009-10-06 04:55 UTC, John Marks

Note You need to log in before you can comment on or make changes to this bug.
Description John Marks 2009-10-06 04:55:02 UTC
Created attachment 24349 [details]
Reproduces the above problem

An exception with the text "Cannot convert x of type java.lang.Integer to class
java.lang.Number" if the begin, end, or step attributes are provided with an EL
${} expression. The "x" in the above text will be the number it is attempting
to coerce and java.lang.Integer can be replaced with any class that extends

A problem similar to this one was reported for Tomcat 6.0.14 in bug 44766.
Comment 1 Konstantin Kolinko 2009-10-08 04:54:45 UTC
1. It works for me with latest 6.0.x code.
2. It looks the same as Bug 45953, that is already fixed in 6.0.20.

3. Could you have provided a more simple JSP page that reproduces the issue? E.g. only with JSTL tags, without all those Faces, and with source code for the beans that were used? E.g., as a war file. I had to modify your page to be able to run it.
4. The correct URL for JSTL Core tags would be "http://java.sun.com/jsp/jstl/core". The one that you are using is for old JSTL 1.0. See the c.tld file. Of course, you app may be configured to accept both of them, but the new one is better.

*** This bug has been marked as a duplicate of bug 45953 ***