File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is Servlet Singelton" Watch "Is Servlet Singelton" New topic
Author

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 ?

Rgrds
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
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.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is Servlet Singelton