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 Create two instance of Servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Create two instance of Servlet" Watch "Create two instance of Servlet" New topic
Author

Create two instance of Servlet

Shrawan Bhageria
Ranch Hand

Joined: Jun 20, 2005
Posts: 52
Hi All,

Please let me know how we create two instance of servlet in multithreaded servlet.


Regards,
Shrawan
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459



Servlets are already multithreaded, you do not need to create multiple instances or even manage the instances - it is the container's job to do this for you.

dave
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

If you want two servlet instances from the same servlet class, create two servlet entries in your deployment descriptor. Give them each unique names.

Why would you want to do this?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Create two instance of Servlet