This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Struts and the fly likes Scope of ActionForm Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Scope of ActionForm" Watch "Scope of ActionForm" New topic
Author

Scope of ActionForm

Deepika Saxena
Ranch Hand

Joined: Jul 05, 2009
Posts: 59
Hi,
could any body clarify what is the scope of an ActionForm? I know that each ActionForm is associated with a servlet and thus the scope of an ActionForm is the associated Servlet. Please correct me if i am wrong.

Thanks.
--Deepika.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31680
    
189

Deepika Saxena wrote:could any body clarify what is the scope of an ActionForm?

It depends on what you set in the Struts Config file. It could be request or session.

Deepika Saxena wrote:I know that each ActionForm is associated with a servlet and thus the scope of an ActionForm is the associated Servlet.

Is it? There's usually only one servlet and many actions. Actions can have their own forms or share them.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Deepika Saxena
Ranch Hand

Joined: Jul 05, 2009
Posts: 59
Hi jeanne,
Thanks for the response and correcting me. If Actions can share Action Forms among them, please let me know how this can be achieved.
--Deepika
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: Scope of ActionForm