Wednesday, November 4, 2009

How to unpack a WAR file

A WAR file is a web application, zipped into a single file. It is basically just a ZIP file with a special folder structure. It is called a WAR file to identify it as a web application.

Why would I want to unpack my WAR file?

    * WAR files are sometimes more difficult to undeploy, and have problems such as not being able to determine the application root, it is sometimes preferable to unpack the WAR file.
    * Some packages such as JSPWiki have the properties files in the WAR, so it must be unpacked to edit settings before deployment.

How to unpack

    * Rename the file as a zip file (eg: myapp.war becomes myapp.zip)
    * Unzip as you would with any other zip file




No comments: