Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000707 [Resin] minor always 01-05-06 13:04 01-24-06 16:34
Reporter bregnvig View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.0.17
Summary 0000707: c:forEach uses the requestScope for var attribute
Description I have a JSP that uses several c:import tag.

In my action (I'm using Struts) I have the follwing line:

request.setAttribute("cmsPage", cmsPage);

In my imported "menu" page, which is imported before my content page, I have the following code (In this case it is not relevant where the "cmsPages" attribute comes from):

<c:forEach var="cmsPage" items="${cmsPages}">

In my later imported content page I have something like this:

The problem is that the "cmsPage" attribute in the menu page has now overridden my "cmsPage" attribute in the content page, leaving it as null or empty.

My point is that the var attribute in the c:forEach tag, in this case "cmsPage" should have been stored in the pageScope. Not on the requestScope. The spec says the following about the var attribute: "This scoped variable has nested visibility." Not the case here.
Additional Information
Attached Files

- Relationships

- Notes
01-24-06 16:34

jsp/1cm8, jsp/1dm8

- Issue History
Date Modified Username Field Change
01-05-06 13:04 bregnvig New Issue
01-24-06 16:34 ferg Note Added: 0000774
01-24-06 16:34 ferg Assigned To  => ferg
01-24-06 16:34 ferg Status new => closed
01-24-06 16:34 ferg Resolution open => fixed
01-24-06 16:34 ferg Fixed in Version  => 3.0.18
01-24-06 16:34 ferg View Status @0@ => public

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker