File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Difference between request Scope and Page Scope? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Difference between request Scope and Page Scope?" Watch "Difference between request Scope and Page Scope?" New topic
Author

Difference between request Scope and Page Scope?

Veena Pointi
Ranch Hand

Joined: Jun 20, 2002
Posts: 442
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


SCJP1.4
"Continuous effort - not strength or intelligence - is the key to unlocking our potential."
*Winston Churchill
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
Check this thread.
[ March 20, 2006: Message edited by: Vishnu Prakash ]

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
MInu
Ranch Hand

Joined: Oct 09, 2003
Posts: 517
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.


God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Kj Reddy
Ranch Hand

Joined: Sep 20, 2003
Posts: 1704
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

Joined: Jun 20, 2002
Posts: 442
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

Joined: Apr 08, 2006
Posts: 1
Can anyone help giving more explanation or an example to show the differnce between page scope and request scope.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between request Scope and Page Scope?