tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Lewis" <james.le...@goodtechnology.com>
Subject RE: Execute servlet when I startup Tomcat
Date Tue, 15 Apr 2003 11:05:04 GMT
You could also write your own LifeCycleListener. This has a couple of
methods:
"contextInitialized" and "contextDestroyed" that you can use to run any
initialisation/cleanup that you need.


james



> -----Original Message-----
> From: Ameen Jaradat [mailto:ameenj@labbaik.com]
> Sent: 15 April 2003 11:39
> To: 'Tomcat Users List'
> Subject: RE: Execute servlet when I startup Tomcat
>
>
> Hello
>
> I hope that the following paragraph about web.xml will be helpful to you
>
>
> ----------------------------------------------------------------
>
> <!ELEMENT servlet (icon?, servlet-name, display-name?, description?,
> (servlet-class|jsp-file), init-param*, load-on-startup?, run-as?,
> security-role-ref*)>
>
> The load-on-startup element indicates that this servlet should be
> loaded (instantiated and have its init() called) on the startup
> of the web application. The optional contents of
> these element must be an integer indicating the order in which
> the servlet should be loaded. If the value is a negative integer,
> or the element is not present, the container is free to load the
> servlet whenever it chooses. If the value is a positive integer
> or 0, the container must load and initialize the servlet as the
> application is deployed. The container must guarantee that
> servlets marked with lower integers are loaded before servlets
> marked with higher integers. The container may choose the order
> of loading of servlets with the same load-on-start-up value.
>
> ----------------------------------------------------------------
>
> For complete information check (http://java.sun.com/dtd/web-app_2_3.dtd)
>
> Regards
>
>
>
>
> -----Original Message-----
> From: Manuel [mailto:mgp2@alu.um.es]
> Sent: Tuesday, April 15, 2003 12:58 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Execute servlet when I startup Tomcat
>
> Hi.
>
> I've a servlet that run a thread. I would like to execute this servlet
> when
> I startup Tomcat.
>
> How can I execute this servlet??
>
> Regards.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message