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 ActionServlet instances 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 "ActionServlet instances" Watch "ActionServlet instances" New topic

ActionServlet instances

Reema Patel
Ranch Hand

Joined: Jan 26, 2006
Posts: 169
Hello All,
I'm new to Struts development. I have a basic quest. Is there just one instance of the Struts ActionServlet that is shares across all requesting clients in ideal conditions?

I know one can have multiple controllers but that's nor recommended. SO in normal condition incase you are providing your own controller (by entending struts controller) how many instances are there in the JVM for that partucular controller servlet?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
I think, one instance per JVM or one instance per application if it is deployed on single server...

Reema Patel
Ranch Hand

Joined: Jan 26, 2006
Posts: 169
I have not read about this anywhere so that I take it for granted!
But I think it all makes sense to have only a single instance of the controller component per web app.

Anybody pls. correct me if I'm wrong.
It is sorta covered in the JavaRanch Style Guide.
subject: ActionServlet instances
Similar Threads
Can i have more than one ActionServlet in my web application
Front Controller, Intercepting Filter,...
struts question
Servlet: "action" failed to preload on startup in webapp: "DefaultWebApp"
can we extend ActionServlet