A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
loading a servlet on tomcat 5.5.1 startup
Joined: Dec 05, 2000
Feb 02, 2008 01:46:00
5.5.1. I want to run a
when the server starts. How do I do that?
I tried using <load-on-startup>1</load-on-startup> but it did not work.
Thanks and regards,
Joined: Mar 22, 2005
Feb 02, 2008 01:56:00
Having a load-on-startup element inside of the servlet element should do the trick. Note that it will run the init method, not any of the other methods.
Using Tomcat 5.5 you should really use the contextInitialized method of a
, though. load-on-startup is a hack, and has been made obsolete by context listeners.
I agree. Here's the link:
subject: loading a servlet on tomcat 5.5.1 startup
How can I verify the ocurrence of <load-on-startup> Servlet? (TOMCAT)
Deploy struts app
cannot load servlet name :
Running a servlet on startup
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015