RE: Initializer servlet?

2002-02-08 Thread Brian Richards

The 2.3 Servlet API has Lifecyle Events.  You just have to use the
listener tag in your web.xml to specify a class that implements the
ServletContextListener interface.  There is an explanation at

http://developer.java.sun.com/developer/technicalArticles/Servlets/servl
etapi2.3/

under the Lifecyle Events section.  I've use this a few times in
Tomcat 4 with no problems.  

Bsr


-Original Message-
From: Mark Woon [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 08, 2002 9:21 AM
To: Struts Users Mailing List
Subject: Initializer servlet?


Hello.

I've seen a few posts about initializer servlets that basically does
whatever setup/housekeeping work needs to be done for the application.
How do you guarantee that this servlet will run before anything else?
Is this something you can define within your servlet container? If so,
does anyone know how you'd do this with Tomcat?

Thanks,
-Mark


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





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




Re: Initializer servlet?

2002-02-08 Thread Jay sissom

In the web.xml file, you can give each servlet a loading order.  Just make 
sure your initilizing servlet has a lower number than the struts action 
servlet.

Jay

On Fri, 8 Feb 2002, Mark Woon wrote:

 Hello.
 
 I've seen a few posts about initializer servlets that basically does
 whatever setup/housekeeping work needs to be done for the application.
 How do you guarantee that this servlet will run before anything
 else?  Is this something you can define within your servlet container?
 If so, does anyone know how you'd do this with Tomcat?
 
 Thanks,
 -Mark
 
 
 --
 To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
 For additional commands, e-mail: mailto:[EMAIL PROTECTED]
 


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




RE: Initializer servlet?

2002-02-08 Thread Galbreath, Mark

Specify it in the load-on-startup tag in web.xml (not sure about the exact
tag syntax).

Mark

-Original Message-
From: Mark Woon [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 9:21 AM

I've seen a few posts about initializer servlets that basically does
whatever setup/housekeeping work needs to be done for the application.
How do you guarantee that this servlet will run before anything
else?  Is this something you can define within your servlet container?
If so, does anyone know how you'd do this with Tomcat?

Thanks,
-Mark

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




RE: Initializer servlet?

2002-02-08 Thread Thinh Doan

try:

   servlet
 servlet-nameInitialization/servlet-name
 servlet-classcom.yourcompany.InitializationServlet/servlet-class
 load-on-startup2/load-on-startup
   /servlet

Thinh

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 10:38 AM
To: 'Struts Users Mailing List'
Subject: RE: Initializer servlet?


Specify it in the load-on-startup tag in web.xml (not sure about the exact
tag syntax).

Mark

-Original Message-
From: Mark Woon [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 9:21 AM

I've seen a few posts about initializer servlets that basically does
whatever setup/housekeeping work needs to be done for the application.
How do you guarantee that this servlet will run before anything
else?  Is this something you can define within your servlet container?
If so, does anyone know how you'd do this with Tomcat?

Thanks,
-Mark

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


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




RE: Initializer Servlet?

2002-02-08 Thread Mattos, John

Also, make sure the number in the load-on-startup2/load-on-startup tag
is lower than the Action Servlet so it loads first...

John Mattos
Sr. Developer and Architect
iNDEMAND
345 Hudson St. 16th Floor
New York, New York
10014

-Original Message-
From: Thinh Doan [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 12:01 PM
To: Struts Users Mailing List
Subject: RE: Initializer servlet?


try:

   servlet
 servlet-nameInitialization/servlet-name
 servlet-classcom.yourcompany.InitializationServlet/servlet-class
 load-on-startup2/load-on-startup
   /servlet

Thinh

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 10:38 AM
To: 'Struts Users Mailing List'
Subject: RE: Initializer servlet?


Specify it in the load-on-startup tag in web.xml (not sure about the exact
tag syntax).

Mark

-Original Message-
From: Mark Woon [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 08, 2002 9:21 AM

I've seen a few posts about initializer servlets that basically does
whatever setup/housekeeping work needs to be done for the application.
How do you guarantee that this servlet will run before anything
else?  Is this something you can define within your servlet container?
If so, does anyone know how you'd do this with Tomcat?

Thanks,
-Mark

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


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

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