You have two options: - Start tomcat from within your application (Embedded mode) - Run your application inside of tomcat Then you have to convert your main in a servlet.
> -----Original Message----- > From: Adrian Klingel [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 17, 2004 5:32 PM > To: [EMAIL PROTECTED] > Subject: Running a Java Application under Tomcat > > > I have a Java application that polls a directory for XML files. This > application is run from a "main" method in one of my classes. > I can run it > from the command line just fine, but I want to deploy it as a web > application. > > Right now, there are no user interface components, but I will > be adding > those, so it makes sense to deploy it under Tomcat. I also > want to take > advantage of connection pooling and JNDI already present in Tomcat. > > I don't know how to make Tomcat run my "main" method, whether it is a > setting in the web.xml file, or what. > > Any help that anyone can offer is deeply appreciated. I > understand that > this is probably a rookie Tomcat question, but I have been > unable to find an > answer after scouring the internet. > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]