Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
    Bookmark Topic Watch Topic
  • New Topic

Page Scope VS request Scope VS session Scope Vs application scope

 
sree visu
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Posts: 133
  • Mark post as helpful
  • send pies
  • Report post to moderator
Thankyou so much seetharaman for your prompt reply
 
Rajendra Prakash
Ranch Hand
Posts: 293
  • Mark post as helpful
  • send pies
  • Report post to moderator
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
Marshal
Pie
Posts: 4259
227
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator
Rajendra, please start a new topic to ask your question, instead of hijacking other threads. Closing this one.
 
    Bookmark Topic Watch Topic
  • New Topic