File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes help on Taglib : jstl/c Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "help on Taglib : jstl/c" Watch "help on Taglib : jstl/c" New topic

help on Taglib : jstl/c

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
hi all,

i though the above code prints one, two and three..
why is it ?

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
i had to use tomcat 5..

Sunny Singh

Joined: Mar 25, 2005
Posts: 3
Rajvee, Here's the right way to get items from request scope.

<C:forEach var="movie" items="${requestScope.movieRequest}">
<TR><TD width="146">${movie}</TD> </TR>
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63865

Either of ${requestScope.movieRequest} or ${movieRequest} will work since the latter searches all scopes to find the variable. The difference is that the first will only look in request scope.

The shorter version will fail only if a conflicting variable named movieRequest also exists in page scope.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: help on Taglib : jstl/c
It's not a secret anymore!