varavoorvishnu
Programmer
- Sep 9, 2002
- 45
Hi All,
The below are the 3 stages when the init() is called in a life cycle of a servlet.The below definitions are provided from Servlet programming by O'relly.
1.when the server starts
2.when the first request to the servlet,called before invoking the service() method.
3.Request from the service Administrator.
Now 1 and 2 looks contradictory.
2nd statment is executed only when a server starts.
As we know that if the server is started only,one can send a requesst.
But as per the 1st statement,then init method will be called and then also for the first request.The theory goes wrong here.
I knew tht init() is called once..but everything looks wrong with the above statements..
I couldnot get the concept right!!
Hope every1 got my understanding..
Plz clarify.
Regards,
Vishnu
The below are the 3 stages when the init() is called in a life cycle of a servlet.The below definitions are provided from Servlet programming by O'relly.
1.when the server starts
2.when the first request to the servlet,called before invoking the service() method.
3.Request from the service Administrator.
Now 1 and 2 looks contradictory.
2nd statment is executed only when a server starts.
As we know that if the server is started only,one can send a requesst.
But as per the 1st statement,then init method will be called and then also for the first request.The theory goes wrong here.
I knew tht init() is called once..but everything looks wrong with the above statements..
I couldnot get the concept right!!
Hope every1 got my understanding..
Plz clarify.
Regards,
Vishnu