Web application in Java.
A Java web application serve and/or generates interactive HTML web pages.
An enterprise application may contain zero or more web applications.
A web application is generally deliverd as a war file (Web Archive). It's JAR files renamed to a .war (web archive) extension.
The deployment unit is an archive file containing all files.
Archive files are typically created by using the jar utility or Ant's jar tool. See Java - Packaging, Archive, Library (JAR, WAR, EAR File)
The war file is a hierarchical set of folders with:
XML Deployment Descriptors
And a web app server descriptor to at minimum defined the context root
See Java - Deployment descriptors (Metadata)
A War is a special JAR file with special treatment for files that should end up in the :
For example, a Java Server Faces web application WAR file using Facelets typically has the following directory structure:
myWebApp/
WEB-INF/
web.xml
weblogic.xml
lib/
MyLib.jar
classes/
MyPackage/
MyServlet.class
index.html
index.jsp
Zie Java - Packaging, Archive, Library (JAR, WAR, EAR File)
jar cvf myWar.war myApp