This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of TensorFlow 2.0 in Action and have Thushan Ganegedara on-line!
See this thread for details.
Win a copy of TensorFlow 2.0 in Action this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

What is the purpose of scope attribute?

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

what is the purpose of scope attribute of action tag?

when scope is assigned request then the scope of form bean object is for that particular request alone. (if i am right)

what would be the scope of the form bean object if scope is session or application?

what does session and application mean in this context?

Thanks
Thanigaivel S.
 
Ranch Hand
Posts: 141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The default scope is request,
when you set the scope as session then bean is available till session live.
if you you havn't set life time of session then untill you close your browser, bean is available.
while in case of application,bean is avaibale till application is running,irrespective of session it is avaible to all.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  • I am pretty sure that the only two values that you can set on your action mapping are "request" and "session".
  • The default is "session"
  • You seem to understand "request" scope
  • With "session" scope an instance of the form will be created when needed and stored in the session. This same instance will be reused between actions that use the same form name.

  • - Brent
     
    With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    reply
      Bookmark Topic Watch Topic
    • New Topic