Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Struts/JSTL c:forEach session scope problem

Status
Not open for further replies.

dshin

Programmer
Jan 20, 2005
2
0
0
CA
Hi,

I currently have an Action class putting some ArrayList objects into the session like so:

request.getSession().setAttribute("releaseHeader", header);
request.getSession().setAttribute("releaseContents",contents);

Now, in my JSP page, I'm trying to use JSTL to access them like so:

<tr bgcolor="lightgrey">
<c:forEach items="${sessionScope.releaseHeader}"
var="headerColumn">
<td align="center" width="200">
<c:eek:ut value="${headerColumn}"/>
</td>
</c:forEach>
</tr>

...

I know my Action class gets called before the jsp page is loaded (so my struts-config.xml is ok). However, when stepping through, the "<c:forEach" doesn't iterate, even though if I try to access "releaseHeader" through scriplet code it works (ie through the implicit session object in the jsp page).

Any ideas as to what I'm doing wrong (it's been awhile since I've used any jsp related technology).

Thanks a lot,
Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top