aspose file tools*
The moose likes Tomcat and the fly likes Archiving precious WAR before uploading new one using Tomcat 6 Manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Archiving precious WAR before uploading new one using Tomcat 6 Manager" Watch "Archiving precious WAR before uploading new one using Tomcat 6 Manager" New topic
Author

Archiving precious WAR before uploading new one using Tomcat 6 Manager

Piyush Mattoo
Ranch Hand

Joined: Mar 12, 2007
Posts: 30
Am trying to archive the previous war file for a Java based web application before i deploy the latest one via the Tomcat 6 Manager web-interface. Would highly appreciate if anyone can throw some more light on achieving the same.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60050
    
  65

You should not be relying upon the deployment folder to retain a working copy. What I do is to always store all war files to a "vault" folder (protected by backups, of course), and copy the war file from there to the Tomcat deployment location. That way, the deployed war file is always superfluous, and if something happens to it, no problem, there's always a good copy waiting in the vault.

The war files are named with the deployment version, so there's never any ambiguity which war file is which.

It also make it easy to regress back to a previous version if ever need be,


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15639
    
  15

I usually use Maven to build webapps these days.

Maven is designed to allow the complete re-creation of any designated release of a software package "forever". I say that in quotes because if one or more of the dependency suppliers changes things that shouldn't be changed (or goes offline), then the process breaks down, but the agreement is that they shouldn't be doing that.

So as long as you have a VCS copy of the application source, including the POM, you can reconstruct the WAR on-demand. Byte for Byte, as long as you have your dependencies wired properly and as long as your dependency suppliers behave.

For shorter-term recovery, however, also have other alternatives. I post my Maven builds to a Nexus server, which keeps the various versions.

For really short-term recovery, I also have another option. I build my releases as OS-installable packages (RPMs), which I then move to a directory on the server after I install them. If I have to regress, I just retrieve the earlier RPM and re-install it as a downgrade.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Archiving precious WAR before uploading new one using Tomcat 6 Manager
 
Similar Threads
Tomcat on Linux tutorial
Deploying Apps w/o shutting down?
org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class: org.apa
problem in Struts2 while running an application
TomCat - WAR deploy