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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "instance of ActionForm" Watch "instance of ActionForm" New topic

instance of ActionForm

padmaratna kamble

Joined: Apr 26, 2006
Posts: 26
Hello Friends
. please tell me when 1000 of clients request simultanuously
comes in struts , and 1000 of view page opens, tell me how may instance of ActionForm creates .

also tell me, is instance of ActionForm create after summiting resuest to ServletAction or at the time of framework loading.......
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The ActionForm instance is not threaded, so if your server receives 1000 HTML requests, 1000 instances of your ActionForm will be created.

However, if you specify "request" as the scope, each instance is available for garbage collection as soon as the server returns a response to the browser.

If you specify "session", you have only one instance per actual user of the system. If you're using session as the scope for any of your forms, it's wise to take steps to see that they're taken out of session scope as soon as the user moves on to another page. That way, at any given time, there is only one ActionForm per user in the session.

Consultant, Sima Solutions
Don't get me started about those stupid light bulbs.
subject: instance of ActionForm
Similar Threads
How to retain search results
ActionForm null
what is the diff b/w the actionform and dto
instance of Action
instance of Servlet Action