A WAR (or “web archive”) file is simply a packaged webapp directory.  In other words it is a kind of zip file or tar file. War files are type of jar file. It is used to deploy servlets. Today we will see How create and extract war files

To extract war file you can simply use jar xvf filename

For example

jar xvf test.war

How to create war files?

It is created using the standard Java jar tool. For example:

cd /home/justgeek/webapps/mywebapp
jar cf ../mywebapp.war *

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>