Can you?  Yes.

The method depends on your version of tomcat. Older tomcat (sorry, I don't remember what version) versions used to require you to add <load-on-startup>1</load-on-startup> to a servlet definition and have the servlet do this work for you. Newer tomcats (at least version 5.0 and 5.5, don't know about 4.1.x) allow you to implement a ServletContextListener for better management including being able to close down the thread when the context is stopped.

--David

Artur Rataj wrote:
Hello!

I would like, just after tomcat starts, to create a new thread. Where
can I put the code that starts it? I do not want to wait with starting
the thread until some servlet is needed.

Best regards,
Artur

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



--
David Smith
Network Operations Supervisor
Department of Entomology
Cornell University
2132 Comstock Hall
Ithaca, NY 14853
Phone: (607) 255-9571
Fax: (607) 255-0940


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

Reply via email to