This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes about the bean's scope Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "about the bean Watch "about the bean New topic
Author

about the bean's scope

David Qiu
Greenhorn

Joined: May 14, 2001
Posts: 8
hi buys
i am new to jsp and now i am confused about the scope attribute in <jsp:useBean> tag, what's the difference between these four (request,page,session,application)? And how to use them correctly?
mohana konakanchi
Ranch Hand

Joined: May 16, 2001
Posts: 67

Hi
request scope means, The Bean can exist for that request only.
Once next request comes, a new bean is accessed. Old bean does not exist.
lly for Session scope, Bean(or it's data accessability) will exist for entire session, means more than one request can have access to the same bean.
For application scope, bean can exist until application is closed
So more than one user/session may share same bean.
Page scope? sorry I am clear about it, I guess it will hold good for one page only..
regards,
Mohana
David Qiu
Greenhorn

Joined: May 14, 2001
Posts: 8
thank you mohana
i've got some clues now
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: about the bean's scope