tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juraj Lenharcik <>
Subject AW: Application init
Date Wed, 24 Apr 2002 14:18:07 GMT

create a servlet with an init method like:

 public void init() { 
    file = getInitParameter("log4j-init-file");
    logfileDestination = getInitParameter("log4j-destination-file");
 		DO LOG4J stuff

and register it in your web.xml:
that should do the work.


-----Ursprüngliche Nachricht-----
Von: Pekník Jan []
Gesendet: Mittwoch, 24. April 2002 16:13
An: 'Tomcat Users List'
Betreff: Application init


I have following problem : 

I have web-application consisting of several JSP, servlets, xml and xsl
files. I'm using LOG4J for logging and JDBC driver for acessing database.
In order to my application work properly, I need to call start-up code
(which set-up LOG4J and build connection pool) before any JSP page or
servlet is opened.
I don't know how to do this if I don't want to test this in the top of every
page / servlet.

Is there any easy solution how achieve this?  


Odchozí zpráva neobsahuje viry.
Zkontrolováno antivirovým systémem AVG (
Verze: 6.0.351 / Virová báze: 197 - datum vydání: 19.4. 2002

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message