This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between request Scope and Page Scope?

 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

What is page Scope ? I didn't find any explanation of what is page scope in the book.What is the difference between Page Scope and request Scope?

Thanks
Veena
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this thread.
[ March 20, 2006: Message edited by: Vishnu Prakash ]
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
requestScope
------------

Attributes of this object are available for the life of the current request.
we can retrieve its value using request.getAttribute() method.

pageScope
---------

PageScope attributes are available only on the current jsp page.

Thanks.
 
Kj Reddy
Ranch Hand
Posts: 1704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The page Scope indicates that the variable is just available in current page, request Scope indicates that the variable is only available for the request(ServletRequest)
 
Veena Pointi
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the info and the link to that thread.So page scope can be thought of thread scope?I mean attributes declared in page scope can be accesible to Thread 1 which is created for servletRequest 1 ?
 
sushma gangatkar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone help giving more explanation or an example to show the differnce between page scope and request scope.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic