tomcat question

How do you run a program when tomcat starts up? When tomcat starts up I need to start up a program which does some initializing, and starts a thread when tomcat starts. I would also like to shut this program down when tomcat shutdowns.

I use a .bat program(tom.bat) to start tomcat. I put it in the Windows folder. When I go to MS-DOS Prompt from the start menu, it opens a dos window with the directory set to C:\Windows. I just type in tom. Here is my .bat program:

You would want to also include code to start your other program. Im not as sure about stopping. I stop tomcat from the dos window that is already open. Sorry I know just enough DOS to get by. Hope that helps [This message has been edited by Randall Twede (edited February 12, 2001).]