Creating a WAR file is simple. For example, to create a WAR file for the helloapp
web application, follow these steps:
1 From the DOS prompt (or from the $ prompt), go to the webapps\helloapp directory
(c:\jakarta-tomcat4.0.1\webapps\helloapp).
2 Jar the helloapp directory by using the jar utility:
c:\jakarta-tomcat4.0.1\webapps\helloapp>jar –cvf helloapp.war *
This will create a helloapp.war file in the c:\jakarta-tomcat4.0.1\webapps
directory.