File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlet Instance help required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Instance help required" Watch "Servlet Instance help required" New topic

Servlet Instance help required

Kumar Gaurav
Ranch Hand

Joined: Apr 08, 2008
Posts: 108
Hi All,

In a web-app say there are 100 servlets so is it like at any point of time there will 100 instances of 100 servlets (assuming one instance per servlet) in server JVM or no of instances will be different.

Please help me out.


Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63866

It depends on how they are declared in the deployment descriptor. You will essentially have one servlet per servlet declaration.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Servlet Instance help required
jQuery in Action, 3rd edition