You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by loredana loredana <lo...@yahoo.com> on 2007/11/15 09:13:05 UTC
load-on-startup problem
I had an application where I had a <load-on-startup>1</load-on-startup> tag in my web.xml for one of my servlets so that whenever tomcat starts, it will run some code from the init() method. Couple of days ago I moved my project to another computer on a new tomcat instalation and after a while I decided to remove the load on startup tag from web.xml and I also deleted the code in the init() method in my servlet. Wierd thing is, whenever I start tomcat now, I look in catalina.out and at startup I can see some exceptions from that servlet, like tomcat would still try to run the servlet at startup. Why is tomcat still trying to load the servlet on startup? deleting load-on startup from web.xml is not enough? do I still have to configure something else? 10x a lot
____________________________________________________________________________________
Be a better sports nut! Let your teams follow you
with Yahoo Mobile. Try it now. http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
---------------------------------------------------------------------
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: load-on-startup problem
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Loredana,
loredana loredana wrote:
> I had an application where I had a
> <load-on-startup>1</load-on-startup> tag in my web.xml for one of my
> servlets so that whenever tomcat starts, it will run some code from
> the init() method.
Note that this practice is deprecated: use a ServletContextListener instead.
> Couple of days ago I moved my project to another
> computer on a new tomcat installation and after a while I decided to
> remove the load on startup tag from web.xml and I also deleted the
> code in the init() method in my servlet. Weird thing is, whenever I
> start tomcat now, I look in catalina.out and at startup I can see
> some exceptions from that servlet, like tomcat would still try to run
> the servlet at startup. Why is tomcat still trying to load the
> servlet on startup? deleting load-on startup from web.xml is not
> enough? do I still have to configure something else? 10x a lot
Are you sure you cleaned-out the old installation? It may be running the
code that is there. Also make sure you have purged your log files in
case that is somehow confusing the issue (looking at old logs).
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHPJR99CaO5/Lv0PARAsK1AKC2m8dax7nkPXvkSDQVNSCHTDxgGQCghRu7
Z5D4lhyXaYVddKnjl21LGDU=
=o99f
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
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