title: Update a war on Tomcat start up
body: <p>I want to setup an update process for an application running on Tomcat. The server which hosts tomcat is only open during working hours (it is an intraner application for a small company). I was thinking that I could upload the new war to the server and set up "something" to run on the next server boot. This something could be a bat file that will be executed on server start up but before the start up of the Tomcat service and it will delete the old war and its exploded folder. When I update manually the war I also delete the work folder of Tomcat (just to be sure). I know about hot deployment but I do not consider it an option since I am not very sure for the implications it might have on the users current working sessions.</p>
  
  <p>Is there a way to run such a bat file before Tomcat start up or an alternative way to do this update? Tomcat version isn't an issue. Now is running Tomcat 6 but I can upgrade to version 7 if needed.</p>
  
  <p>I have also posted this on <a href="https://serverfault.com/questions/378807/update-a-war-on-tomcat-start-up">serverfault</a> but I am posting here and if you think this is in violation of the terms, my apologies and I will remove it.</p>