Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can't access requestScope attributes jstl?

647735Jan 19 2011 — edited Jan 21 2011
Hi,

I'm just learning jstl, and trying a simple thing:

A servlet creates an ArrayList, places it in the request and forwards to a jsp:
request.setAttribute("list", list);
request.getRequestDispatcher("admin.jsp").forward(request, response);
Then in admin.jsp i try to access it, but I get no data at all.
<c:forEach items="${requestScope.list}" var="obj">
	<c:out value="${obj.data}"/>
</c:forEach>
I tried the exact same operation with scriptlet and it worked fine, so the list is there. I have no idea why this isn't working.

Any help is appreciated. Let me know if you need more info.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 18 2011
Added on Jan 19 2011
14 comments
2,991 views