Packaging a Web application
Now that we know what a web application is, we can package it for deployment. The standard method for packaging web applications is to use a Web ARchive file (WAR). You can create a WAR file by using Java's archiving tool jar. An example of this would be to change to the root directory of your web application and type the following command: