• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

about the bean's scope

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you mohana
i've got some clues now
reply
    Bookmark Topic Watch Topic
  • New Topic