File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Creation of form bean instance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Creation of form bean instance" Watch "Creation of form bean instance" New topic

Creation of form bean instance

Akshay Singhvi
Ranch Hand

Joined: Nov 08, 2005
Posts: 93
Hello Ranchers,
When is the form bean instance created and is it created just once or always when the data is populated to the form bean.

Regards,<br />Akshay Singhvi<br />SCJP 1.4 (95%)<br />SCWCD 1.4 (86%)
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
If you have your action mapping configured to use request scope then a new instance of your action form will be created for each request. If your action mapping is configured to use session scope (the default) then an instance will be created, stored on the session, and reused between requests. In either case, every user would have their own instance.

- Brent
I agree. Here's the link:
subject: Creation of form bean instance
It's not a secret anymore!