Jason Hunter's book (Java Servlet Programming) has entire chapter devoted to
Servlet's life cycle.
This is an excellent book and I would recommend you to have this book handy
while working.
Any how, I think you have to consider the database connection pooling
different from init of servlet.
Thanks & Regards, Goldman
Atchutarao Killamsetty, Sachs
GSAM-IT,Tokyo
Tel:03-5573-7871
----------------------------------------------------------------------------
------------
"If at first the idea is not absurd, then there is no hope for it."
-Albert Einstein
----------------------------------------------------------------------------
------------
-----Original Message-----
From: Gopalankutty, Ravi Kumar (CTS) [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 09, 2000 6:55 PM
To: [EMAIL PROTECTED]
Subject: Servlet Life Cycle
Importance: High
Hi list,
I am slightly confused with the servlet life cycle. Say, I invoke a servlet
(LoginServlet) from a html page. This invoked servlet goes through an init
phase,handles the service call in which it throws another page dynamically.
When the user gets this display on his browser, is that when the servlet
destroys itself?
Supposing another client requests for the same servlet then, does the server
create another instance in which case the init cycle is not performed ( am I
right here???) or does it create another servlet object to service the
second call?
The reason for this question is because I want to maintain the connections
(to databases) that I make in the init method of the first servlet to
service all requests to that servlet.
Does Apache support such instance persistance mechanism?
Thanks * Regards
Ravi Kumar Gopalankutty
Cognizant Technology Solutions,
Ph: 044-2354281 Extn:4423
e-mail: [EMAIL PROTECTED]
_______________________________________________________________
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html