File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 30919
    
158

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.


[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
 
Don't get me started about those stupid light bulbs.
 
subject: Scope of ActionForm