tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Fusari" <dav...@sentillion.com>
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.

David.

-----Original Message-----
From: Marc Saegesser [mailto:marc.saegesser@apropos.com]
Sent: Thursday, December 28, 2000 1:46 PM
To: tomcat-user@jakarta.apache.org
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
information.

-----Original Message-----
From: Shahed Ali [mailto:shahed@enoor.com]
Sent: Thursday, December 28, 2000 10:23 AM
To: tomcat-user@jakarta.apache.org
Subject: Init() being called 3 times


Hi,


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
times.

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

Thanks
Shahed.



Mime
View raw message