wood burning stoves 2.0*
The moose likes Servlets and the fly likes Methods of creating Servlet instance? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Methods of creating Servlet instance?" Watch "Methods of creating Servlet instance?" New topic
Author

Methods of creating Servlet instance?

Vikrama Sanjeeva
Ranch Hand

Joined: Sep 02, 2001
Posts: 756
Hi guys,
In how many ways one can create instance of Servlets?.
For e.g.
One method is to create instance in init() method, so when ever the server loads, a servlet instance will create.
I think there must be more methods.May be there is a method which creates instances when ever 1st request is made by client.
Bye.
Viki.
SCJP2


Count the flowers of your garden, NOT the leafs which falls away!
Prepare IBM Exam 340 by joining http://groups.yahoo.com/group/IBM340Exam/
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
You don't create a servlet instance. The server creates the servlet instance. The init method does not create your servlet instance -- instead it is called after it is created.
The instance is created by the framework in one of two ways, either on web container startup (as indicated by the "load-on-startup" tag) or upon first invocation by a client.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
wood burning stoves
 
subject: Methods of creating Servlet instance?