aspose file tools
The moose likes JSP and the fly likes help on Taglib : jstl/c Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "help on Taglib : jstl/c" Watch "help on Taglib : jstl/c" New topic
Author

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 ?

Thanks,
Rajeev
Rajeev Ravindran
Ranch Hand

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

Rajeev.
Sunny Singh
Greenhorn

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>
</C:forEach>
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56197
    
  13

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.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: help on Taglib : jstl/c
 
Similar Threads
c:foreach--attribute problem
JSTL pg 437 HFSJ
JSTL does not show values
can't run jstl in jsp
Using JSTL example in K&B Book