Re: redeploying war files
On 10/02/2010 10:39, Jan Van Besien wrote: > Mark Thomas wrote: >> If you redeploy a WAR file while Tomcat is stopped you need to deleted >> the exploded directory as well. > > Ok, thanks for clarifying that for me. > > Can I safely delete the exploded files if tomcat is still running as > well? In that case, I could do it always, without checking if tomcat is > running. I don't think so. I fairly sure Tomcat will delete the WAR too. Of course, you could just try it an see... Mark > My use case is that we want to install war files packaged as rpms. The > rpm simply puts the war file in the webapps directory, When a new rpm is > installed, the rpm mechanism will remove the old war file and put a new > war file in place, but will not cleanup the exploded directory. I can > change my rpms to delete the exploded directory as well, but it would be > more difficult if I have to add a script to my rpms to check if tomcat > is running or not. > > thanks again, > Jan Van Besien > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redeploying war files
On 10 February 2010 10:39, Jan Van Besien wrote: > Can I safely delete the exploded files if tomcat is still running as well? > In that case, I could do it always, without checking if tomcat is running. You shouldn't get any errors in your RPM if you delete the files. Tomcat itself has error handling whenever it fails to find a file it's expecting, as far as I know. If your webapp is processing any requests at the time it's removed and redeployed, you'll probably want to put in appropriate error handling in case it suddenly can't find a resource it thought was available! - Peter - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redeploying war files
Mark Thomas wrote: If you redeploy a WAR file while Tomcat is stopped you need to deleted the exploded directory as well. Ok, thanks for clarifying that for me. Can I safely delete the exploded files if tomcat is still running as well? In that case, I could do it always, without checking if tomcat is running. My use case is that we want to install war files packaged as rpms. The rpm simply puts the war file in the webapps directory, When a new rpm is installed, the rpm mechanism will remove the old war file and put a new war file in place, but will not cleanup the exploded directory. I can change my rpms to delete the exploded directory as well, but it would be more difficult if I have to add a script to my rpms to check if tomcat is running or not. thanks again, Jan Van Besien - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redeploying war files
This time with the response... On 10/02/2010 10:12, Mark Thomas wrote: > On 10/02/2010 09:08, Jan Van Besien wrote: >> Am I making wrong assumptions? Yes. >>The documantation [1] explicetely says >> "... and it is newer than the exploded web application, the exploded >> directory will be removed and the webapp will be redeployed from the .WAR". Those are the deployer docs. The deployer requires Tomcat to be running so the description in that case is correct. If you redeploy a WAR file while Tomcat is stopped you need to deleted the exploded directory as well. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: redeploying war files
On 10/02/2010 09:08, Jan Van Besien wrote: > Hi all > > I'm using tomcat-6.0.18 with java-1.6.0-18 on ubuntu-9.10. > > I have a question about the feature to automatically deploy war files > when they are dropped in the webapps directory. Sometimes, this doesn't > work as I would expect it to work, and I want to find out if this is > expected or if something can be done about it. > > Allow me to describe a scenario: > > - tomcat is not running > - copy a war file (say test.war) to the webapps directory > - start tomcat > > now everything is ok, the test.war file gets "exploded" into a test > directory, and the application is deployed. > > - stop tomcat > - corrupt some files in the exploded directory (e.g. remove all > libraries from WEB-INF/lib) > - touch test.war, such that it is certainly newer than then exploded > directory > - start tomcat > > now the deployment fails, while I would expect tomcat to explode the > test.war file again, because it is newer than the exploded directory. > > Am I making wrong assumptions? The documantation [1] explicetely says > "... and it is newer than the exploded web application, the exploded > directory will be removed and the webapp will be redeployed from the .WAR". > > Thanks in advance, > Jan Van Besien > > [1] http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
redeploying war files
Hi all I'm using tomcat-6.0.18 with java-1.6.0-18 on ubuntu-9.10. I have a question about the feature to automatically deploy war files when they are dropped in the webapps directory. Sometimes, this doesn't work as I would expect it to work, and I want to find out if this is expected or if something can be done about it. Allow me to describe a scenario: - tomcat is not running - copy a war file (say test.war) to the webapps directory - start tomcat now everything is ok, the test.war file gets "exploded" into a test directory, and the application is deployed. - stop tomcat - corrupt some files in the exploded directory (e.g. remove all libraries from WEB-INF/lib) - touch test.war, such that it is certainly newer than then exploded directory - start tomcat now the deployment fails, while I would expect tomcat to explode the test.war file again, because it is newer than the exploded directory. Am I making wrong assumptions? The documantation [1] explicetely says "... and it is newer than the exploded web application, the exploded directory will be removed and the webapp will be redeployed from the .WAR". Thanks in advance, Jan Van Besien [1] http://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org