Mantis - Resin
Viewing Issue Advanced Details
2804 minor always 07-24-08 10:39 08-21-08 09:22
closed 3.1.6  
none 3.1.7  
0002804: c:forEach deletes the request scoped variable
In a struts action I set the following:

request.setAttribute("child", child);

In my JSP I can now use my child object using ${child.firstName}.

But after I've executed a forEach with the following statement:

<c:forEach var="child" items="${pageScope.children}">

I can no longer use ${child.firstName} as the attribute has been removed.

The JSTL spec says:
Name of the exported scoped variable for the
current item of the iteration. This scoped
variable has nested visibility. Its type depends
on the object of the underlying collection.

So I assume the forEach should not have removed the request scoped attribute only the page scope attribute from the forEach loop.
It works as expected on 3.0.x

08-21-08 09:22   
jsp/(1cmg, 1cmh, 1cmi, 1ddv, 1dduJ)