They are just jar files with a .war extension, special directory structure and deployment descriptor. You can create them using the jar utility.
Structure:
- All static html pages and any jsp pages go in the root directory of the war. This may include a full directory structure.
- A special Web Application Deployment Descriptor goes in a directory called WEB-INF, the file is name web.xml
- All Servlet and supporting classes (Javabeans, etc.) go in the WEB-INF\classes directory.
- All other classes including third-party tools go in the WEB-INF\lib directory. These can be jars.