• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

default scopes of form bean and data bean

 
Srinivasa Datla
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody tell me what are the default scopes of Form bean and data bean?
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
request scope will b default if not mistaken
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The default for an ActionForm is "session". I was looking for documentation to back this up...I am sure there is a page that lists the default values but the best I could turn up in under 1 minute was this page that says:

"ActionForms can be stored in either the session (default) or request scopes"

http://struts.apache.org/1.1/userGuide/building_controller.html#action_form_classes

You can configure your application to use the class RequestActionMapping which would cause the default to be "request", but out of the box "session" is the default.

I have no idea what you mean be "data bean".

- Brent
 
Milan Jagatiya
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

The default scope of an ActionForm is session.
I am not getting "data bean ". can you explain what is it?

milan.
 
Srinivasa Datla
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all.
i mean data bean is a java bean.
I got the answers as java bean has a page scope and form bean has a session scope as default.

- Sri
 
Nakata kokuyo
Ranch Hand
Posts: 472
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Brent Sterling and Milan Jagatiya for correction, and sorry for causing any confusing Srinivasa Datla

i normally have all the action in request scope, and it does confuse me the default scope was request
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic