tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard Plukker <>
Subject Re: Initializing Application at startup
Date Mon, 01 Jul 2002 12:34:10 GMT
You could envoke the constructor of your initialize class from a servlet.
You should use the init method. If you use load at startup in your 
web.xml you can
garantee that the initialisation of you app is done when tomcat starts.

For the path properties, you can also use the contextParams, this way 
you put the path of you config.file as a context param in your web.xml.

please read the documentation and look at the examples, it's all there.


maarten roosendaal wrote:

>I've build an Initialize-class which reads in several
>.properties-files. What i want is that when Tomcat
>starts and my webapplication is started, that the
>Initialize-class is called so that it can read in alle
>the .properties-files.
>How do i tell Tomcat (or my webapp) to initialize this
>class (to call the initialize-method) and where do i
>need to specify these .properties-files? For example i
>defined a static String:
>in my initialize-class. This String should somewhere
>be defined as application.initializer.configuratie=
> I should be able to read the
>content of this file through:
>String propertiesfileName =
>But i'm not sure how to call/initialize the class and
>where to place/define the .properties-files. Hope
>someone can help me.
>Do You Yahoo!?
>Yahoo! - Official partner of 2002 FIFA World Cup
>To unsubscribe, e-mail:   <>
>For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message