my dog learned polymorphism*
The moose likes JSP and the fly likes Little Information required about page and pagecontext Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Little Information required about page and pagecontext" Watch "Little Information required about page and pagecontext" New topic
Author

Little Information required about page and pagecontext

Adam Zedan
Ranch Hand

Joined: Jun 10, 2011
Posts: 124

hi i am familiar with request,session and application(similar to context) scope in a jsp but i am not familiar with the page scope could anyone please give me some idea about page and pagexontext ?? what are they used for ??


Don’t look where you fall, but where you slipped
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

page is a buitlin scripting variable that is no longer exposed by the EL. it wasn;t even used much in scriptlets.

pageContext (not pagecontext -- case counts!) is a scope that is limited to the current page. Unlike request scope, it isn;t shared across forwards or includes.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Adam Zedan
Ranch Hand

Joined: Jun 10, 2011
Posts: 124

when would you use pageContext.setAttribute() ?? and why would you want to use it ??
what is the difference between page and pagecontext
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

Adam Zedan wrote:when would you use pageContext.setAttribute() ??
Perhaps in a custom tag.

what is the difference between page and pagecontext

Already explained.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Little Information required about page and pagecontext
 
Similar Threads
How to send alrt message from servlet to html
page scope
How to run servlet which send email, on client's computer
Birthday Party Invite in Southern California
About PageContext