This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell 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


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: 61316
    
  66

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: 61316
    
  66

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 ]
 
GeeCON Prague 2014
 
subject: How to get data from pageContext