WAR files are nothing really special. You are in essence merely ordinary JAR files that must however have a different Extrension. And they include not just a class hierarchy, a library, as usual in JAR files, but a fully packed Web Directory. This means that all files in the "Document Root" will be packaged in a WAR file. Suppose we wanted to pack our "example" Web Application. Then we would first go to the appropriate directory and type the following command:
"jar cfv example.war ." or "jar cfv example.war -C pathToDir."
The condition that the jar-tool of the JDK in the path of the executable files are located. Otherwise, the tool over its full path will be called. The jar tool writes the relative directory name of the packed files in the file. Therefore, one must either go to the root directory of the Web application to gripping, or communicated with "C pathToDir" the tool, in which directory it should go to the packing.
Bookmarks