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!
posted 15 years ago
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