You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Oliver Schoenwald <Ol...@FernUni-Hagen.de> on 2007/02/12 09:49:27 UTC

Initialize Webapplication on tomcat Startup

Hello and good morning (at least from Germany),

I'm running Tomcat 5.5.17 under Solaris 9 and have created a 
webapplication that
starts some repeating background-tasks as soon as the application has 
been started
the first time (in other words: I have a single controller-servlet and 
the init()-method
contains some calls to classes that create background demon processes 
for some system
analysis).

Now, when I restart the tomcat engine, I have to call the URL of my 
webapplication to
have the engine initialize my application for the first time. I remember 
that there is some
option in the configuration of tomcat which tells the engine to startup 
certain applications
automatically. So far I couldn't find that option in the docs.

Can someone be so nice to point me to the right documentation or gives 
me an example
how to solve my problem?

Thank you in advance,

Oliver


-- 
Oliver Schönwald, Diplom-Informatiker

FernUniversität Hagen
Zentrum für IT und Medien (ZMI) - Competence Center Anwendungsentwicklung
Universitätsstr.21/AVZ - 58084 Hagen - Deutschland
fon: +49 2331 987 1721 - email: oliver.schoenwald@fernuni-hagen.de



Re: Initialize Webapplication on tomcat Startup

Posted by Leon Rosenberg <ro...@googlemail.com>.
A little side note, using a context listener instead of servlet would
be the "sprucer" solution.

regards
Leon

On 2/12/07, Oliver Schoenwald <Ol...@fernuni-hagen.de> wrote:
> Thank you, this was exactly what I was seeking. Works properly.
>
> :-)
>
> David Delbecq schrieb:
>
> ><!-- ################# Initialisation Servlet ################# -->
> >    <servlet>
> >        <display-name>System Init Servlet</display-name>
> >        <servlet-name>initializer</servlet-name>
> >        <servlet-class>be.rmi.intranet.servlet.SetupServlet</servlet-class>
> >        <load-on-startup>1</load-on-startup>
> >    </servlet>
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Initialize Webapplication on tomcat Startup

Posted by Oliver Schoenwald <Ol...@FernUni-Hagen.de>.
Thank you, this was exactly what I was seeking. Works properly.

:-)

David Delbecq schrieb:

><!-- ################# Initialisation Servlet ################# -->
>    <servlet>
>        <display-name>System Init Servlet</display-name>
>        <servlet-name>initializer</servlet-name>
>        <servlet-class>be.rmi.intranet.servlet.SetupServlet</servlet-class>
>        <load-on-startup>1</load-on-startup>
>    </servlet>
>
>  
>



Re: Initialize Webapplication on tomcat Startup

Posted by David Delbecq <de...@oma.be>.

<!-- ################# Initialisation Servlet ################# -->
    <servlet>
        <display-name>System Init Servlet</display-name>
        <servlet-name>initializer</servlet-name>
        <servlet-class>be.rmi.intranet.servlet.SetupServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>




En l'instant précis du 02/12/07 09:49, Oliver Schoenwald s'exprimait en
ces termes:
> Hello and good morning (at least from Germany),
>
> I'm running Tomcat 5.5.17 under Solaris 9 and have created a
> webapplication that
> starts some repeating background-tasks as soon as the application has
> been started
> the first time (in other words: I have a single controller-servlet and
> the init()-method
> contains some calls to classes that create background demon processes
> for some system
> analysis).
>
> Now, when I restart the tomcat engine, I have to call the URL of my
> webapplication to
> have the engine initialize my application for the first time. I
> remember that there is some
> option in the configuration of tomcat which tells the engine to
> startup certain applications
> automatically. So far I couldn't find that option in the docs.
>
> Can someone be so nice to point me to the right documentation or gives
> me an example
> how to solve my problem?
>
> Thank you in advance,
>
> Oliver
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org