Compressing files and renaming the WAR file
After editing the web.xml file, compress and rename the archive. For example, rename the archive newJavaComponent.war. Compress the files into a WAR file of a different name to preserve your original WAR file.
How to compress files and rename the WAR file
1 After editing web.xml in the WEB-INF directory, move up one directory.
2 Check that files shown in Figure 2‑1 are present in your current directory.
3 Compress the files and specify a new name for the WAR file. Type the following command:
jar -cf newJavaComponent.war *
Use this command on Windows or Linux. The WAR file containing the modified configuration values in web.xml appears.