tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Lucia" <timlu...@yahoo.com>
Subject RE: When is init() called?
Date Thu, 11 May 2006 13:14:30 GMT
init() is called when the servlet is instantiated.  If you have
<load-on-startup>1</load-on-startup> then it will get called when the web
app is (re)started.  Otherwise, it will get called when the first request
for it is made.  To answer you're a) or b) question, it is both a and b.

Tim


-----Original Message-----
From: Martin Grogan [mailto:mgrogan@keizensoftware.com] 
Sent: Thursday, May 11, 2006 7:25 AM
To: Tomcat Users List
Subject: When is init() called?

Hi all,
I'm new to the list. I was trying to find out exactly when Tomcat will call
a servlets init() method.
Is it
    a) When tomcat is restarted or
    b) When I restart my web-app context from the Tomcat manager panel.
I ask because we run web-apps on a shared hosting server and don't have
control over when Tomcat gets restarted, but would need to re-init() our
servlets from time to time. We are running on Tomcat 5.5.7 Thanks, Martin

------------
Martin Grogan
Keizen Software

mgrogan@keizensoftware.com
www.keizensoftware.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message