This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes How to get data from pageContext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "How to get data from pageContext" Watch "How to get data from pageContext" New topic
Author

How to get data from pageContext

KedariNadh vsilla
Greenhorn

Joined: Nov 26, 2008
Posts: 11
Hello All,
I have an application where i stored all the beans in a ArrayList and set the arrayList to pageContext object.Now in my jsp i want to retrieve the ArrayList from pageContext and iterate each index.Can any one plse give the snippet.
Thank you.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60808
    
  65

Please use real words when posting to the forums. Abbreviations such as "plse" in place of "please" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60808
    
  65

Using the El, you simply name the scoped variable. If you placed data in page scope using the named xyz, the code is simply:

Be aware that page-scoped variables only exist within the page in which they are created.

For iteration, the <c:forEach> tag is used.
[ December 29, 2008: Message edited by: Bear Bibeault ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get data from pageContext
 
Similar Threads
Simple Tag - Get Request Object
Does EL have a findAttribute() method
Diff between page and pageContext
JspContext and PageContext - Doubt on HFSJ
Please help me?