I have a ROOT.war file which I used to deploy version 1 of my web site. I now rename this file to be ROOT_v1.war and set it aside. Then I do some changes and create a new ROOT.war file and deploy it.

If I want to do a rollback, will it be enough to just rename and copy ROOT_v1.war back to the server?

Or do I need to update its date? Or do the dates that count are those of the files inside it?

| improve this question | | | | |

To be sure, I would undeploy the application, check my tomcat/webapps/ folder for any traces of the application having been left & then deploy the 'original' application.

| improve this answer | | | | |
  • How do you "undeploy" an application ? – epeleg Jul 14 '11 at 7:25
  • Either click 'undeploy' in the manager webapp interface or rm tomcat/webapps/ROOT.war – Pricey Jul 14 '11 at 8:05
  • "the manager webapp interface" ? where do I find this ? – epeleg Jul 14 '11 at 14:00
  • If installed & running It will probably be at ipaddress:port/manager but then requires a password etc. I'm guessing you haven't got any of that sorted though, so just rm or mv the war. – Pricey Jul 14 '11 at 14:10
  • /manager does not seem to exist on my installation. where would I install this from? (please on both linux and windows). – epeleg Jul 18 '11 at 11:25

I have found that if I update (Touch) the date of the old .war file to be current It is enough to make it redeploy over the newer version.

| improve this answer | | | | |

Renaming ROOT_v1.war to ROOT.war would deploy application successfully. You'll need to restart tomcat though.

| improve this answer | | | | |
  • its been my experience that this is NOT enough. – epeleg Jul 18 '11 at 11:23

It should be enough. In my experience it doesn't always work like that. You should always test to be sure.

If you want to be 100% sure, stop tomcat, delete the cache. If you have multiple apps running, or if you cannot stop tomcat for some reason, you might want to try the admin-module, which lets you stop the specific webapp. Then you can delete the cache for that app, and start it again. If you know what has changed, you can look for the subdirectories where the changes have been made, and only delete those directories in the cache.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.