aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Page Scope VS request Scope VS session Scope Vs application 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)
Reply locked New topic
Author

Page Scope VS request Scope VS session Scope Vs application scope

sree visu
Ranch Hand

Joined: Jul 05, 2007
Posts: 133
I am not very clear regarding the four scopes.Could anyone please explain me the exact differences between all four of them please.

Thanks for your help in advance


Regards<br />Sree Visu<br />SCJP 5.0, SCWCD 5.0, SCJD(Preparing B&S 2.2.2)
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi,

Scope is nothing but lifetime object

1.page - only in the particular jsp

2.request- only in the jsp to which you forward your request object

3.session- it is available until the session is invalidate(you can access it from any jsp)

4.application-it is available until the web application or server shutdown(you can access it from any jsp).available through whole application


Hope This Helps
sree visu
Ranch Hand

Joined: Jul 05, 2007
Posts: 133
Thankyou so much seetharaman for your prompt reply
Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
consider am having three jsp pages a ,b and c. In a.jsp i used request scope, request goes to b.jsp .
Will java bean available for both a, b or only b only.
Devaka Cooray
ExamLab Creator
Saloon Keeper

Joined: Jul 29, 2008
Posts: 3167
    
  47

Rajendra, please start a new topic to ask your question, instead of hijacking other threads. Closing this one.


Author of ExamLab ExamLab - a free SCJP / OCPJP exam simulator
What would SCJP exam questions look like? -- Home -- Twitter -- How to Ask a Question
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Page Scope VS request Scope VS session Scope Vs application scope