No - you have ONLY ONE instance for the ActionServlet.  The user requests are just different threads that simultaneously call methods of the instance of that servlet. I think this is not related to Struts but to Java Servlet Specification - the Application Server creates only one instance of each servlet and calls it's service() method on request.
 
So it doesn't matter if you have 1 or N servlets (unless you run out of memory because you have too many servlets, of course ;-)))).
It's better to stay with one ActionServlet.
 
Danail
-----Original Message-----
From: Jonathan Asbell [mailto:[EMAIL PROTECTED]]
Sent: Saturday, April 28, 2001 3:01 PM
To: [EMAIL PROTECTED]
Subject: Re: Reducing the burden on ActionServlet.

Isnt it true that if you have 10 users you would have 10 instances of the ActionServlet?  I believe it is not a singleton and that you always have an instance of the servet for each threaded request.
----- Original Message -----
Sent: Friday, April 27, 2001 11:44 PM
Subject: Reducing the burden on ActionServlet.


In our project we have more than one hundred jsp (each having an average of 2 or 3 forms )and we have already decided to use struts as our framework. Now the dilema :- We found that managing such a large number of jsp from a single stuts-config.xml file will be a huge  burden. Plus, it seems the ActionServlet will be hard pressed always, as a controller. Considering both these facts we realize that there should be a mechanism to share the load of servlet through some way. Though this can be achieved by using more than one servlet , we don't want to use this solution because it is highlt complex considering the projects interwoven functional requirements.
Is there some way by which we can accomplish an efficient way to manage a large number of jsp files and to increase the performance by reducing load on the servlet.


Thanking in advance.

Reply via email to