jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes Is Servlet Singelton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is Servlet Singelton" Watch "Is Servlet Singelton" New topic

Is Servlet Singelton

manish ahuja
Ranch Hand

Joined: Oct 23, 2003
Posts: 312
Hi all
1) I would like to know if Servlet is designed to implement Singelton . In other words
Can there be more than one instance of a servlet at one time ?

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
In normal operation, the sevlet container (ie Tomcat) only creates a single instance of a servlet. You can have multiple instances of a servlet if you create different definitions in web.xml for a given web application OR if you use the same servlet in different web applications.
If you are seriously interested in programming with servlets you should download the authoritative API documentation from Sun. Last time I looked that is
available here.
I agree. Here's the link: http://aspose.com/file-tools
subject: Is Servlet Singelton
It's not a secret anymore!