In struts , actionservlet will have only one instance.But for action class how many instances will be created.If it is going to be only one instance then for 100 requests will the same instance be maintained?Please clarify.
In Struts 1 there is a single Action created for each mapping.
Joined: Jul 14, 2009
Could you explain me in detail .I am using struts 1.2. While 100 requests are hitting the same action class whether only one instance is created for all the requests or one instance for one request(100 instances).
If only one instance is the case then how the response is send back to the each requests.Do the second request has to wait until the first request is completed?Please reply.
Joined: Jul 10, 2008
Only one instance of action class is created per application, as we know for each request container will create separate thread hence for 100 request 100 theads will be creates and that 100 request can handle concurrently...(which is executing execute() method of action class's single instance) i.e. you can say class variable of action class is not at all thead safe.