How do I deploy WAR file to Tomcat 6.0?

I have a java program, which uses the quartz library for running a cron job. The class that runs the scheduler is defined as the main class in the manifest file. When I deploy it to Tomcat as a war, nothing happens. Any ideas?

  • When running the program on my IDE (IntelliJ), the cron starts executing as expected.

  • Answer:

    You need to create a web application, so i don't see any reason for having a main app. Basically, the cron job should be started from a Servlet Listener, which basically allows you to do different operations when your application is loaded by tomcat (this is in your case). Are you using a web app structure for your project? (WEB-INF folder with web.xml, different location for java files and static files?)

Dan Dobrescu at Quora Visit the source

Was this solution helpful to you?

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.