Hi,
A couple of things:

- Please post your log4j config.  If you look in that list, you'll see a
lot of "why am I getting [n] copies of my logging statements" questions.
This is because all log4j loggers are additive by default, so if you
define n appenders at a level matching your logger, you'll get n copies
of logging statements out.

- There have been questions in the past on this list regarding servlets
and filters being initialized twice, and the bugs were addressed by
developers and marked as resolved.  You may wish to search the list
archives at
http://marc.theaimsgroup.com/?l=tomcat-user&r=1&w=2

- You're using 4.1.12 (not LE, right?) with what version of java?

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Maxime Colas des Francs [mailto:[EMAIL PROTECTED]]
>Sent: Friday, November 29, 2002 10:01 AM
>To: Tomcat Users List
>Subject: multiple execution of a 'load-on-startup'
>
>Hello ,
>
>A strange thing about 'load-on-startup' servlet.
>
>I use tomcat 4.1.12 with multi-host, and log4j 1.2.7
>
>in my web.xml i wrote these lines :
>
><servlet>
>      <servlet-name>Setup</servlet-name>
>      <servlet-class>init.SetupServlet</servlet-class>
>     <load-on-startup/>
></servlet>
>
>and i put an information log at the end of the servlet init() method
>
>at tomcat startup, we can read in the log :
>
>INFO  2002-11-29 09:28:50,084 [Thread-7] init.SetupServlet : end of
>initialisation setup.
>INFO  2002-11-29 09:28:55,352 [HostConfig[myhost]] init.SetupServlet :
end
>of initialisation setup.
>INFO  2002-11-29 09:28:56,943 [HostConfig[myhost]] init.SetupServlet :
end
>of initialisation setup.
>INFO  2002-11-29 09:29:17,647 [main] init.SetupServlet : end of
>initialisation setup.
>INFO  2002-11-29 09:29:20,501 [main] init.SetupServlet : end of
>initialisation setup.
>
>five execution for this servlet ??
>(what an initialisation !)
>
>if i remove the two other host definitions in my server.xml, and
restart
>tomcat,
>this log appear "only" 2 times , execute by a thread main ...
>
>INFO  2002-11-29 09:42:53,267 [main] init.SetupServlet : end of
>initialisation setup.
>INFO  2002-11-29 09:42:56,144 [main] init.SetupServlet : end of
>initialisation setup.
>
>Smby can explain this ??
>Why 5 or 2 executions of a load-on-startup servlet ?
>Why when i remove other host in tomcat configuration file,
>3 lines dissepear in the log of an application on the first ??
>
>thks !
>_
>M
>
>
>
>--
>To unsubscribe, e-mail:   <mailto:tomcat-user-
>[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:tomcat-user-
>[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to