tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Fusari" <>
Subject RE: Init() being called 3 times
Date Thu, 28 Dec 2000 18:51:29 GMT
I have seen the same thing, it does not appear that init is called twice but
that you get 2 instances of the servlet loaded.  Perhaps something to do
with aliases.  My work around was to not specify a context in server.xml but
only specify the servlet mapping in my web.xml.


-----Original Message-----
From: Marc Saegesser []
Sent: Thursday, December 28, 2000 1:46 PM
Subject: RE: Init() being called 3 times

1)  Set Tomcat's debug level to something big (say 20).
2)  Add a System.out.println() call to the begin and end or your init()
method.  Include a timestamp.
3)  Add a call to Thread.currentThread().dumpStack() to the start of your
init() method.
4)  Post the output here.

It is extremely unlikely that the servlet container is calling init() more
than once, but there is no way to diagnose the problem without more

-----Original Message-----
From: Shahed Ali []
Sent: Thursday, December 28, 2000 10:23 AM
Subject: Init() being called 3 times


I am loading a servlet on startup. In the init(), I have a setting some
system properties, and
doing some logging.

When I inspect the logs, its seems that the init method is called exactly 3

Any idea whats going on ?

I am using Tomcat 3.2.1 w/Apache 3.1.14 on Solaris 8 Intel w/JDK 1.3


View raw message