Web application archive
Web Application Archive (sometimes also Web Archive ) is a file format that describes how a complete web application is packed into a file in JAR or ZIP format according to the Java Servlet specification . Such files always have the ending and are therefore colloquially called "WAR files".
.war
structure
For web applications according to the Servlet specification, a certain directory structure is prescribed, which can also be found in the WAR files.
In addition to the file prescribed for all JAR files META-INF/MANIFEST.MF
, each WAR file contains a directory WEB-INF
in which there is a so-called deployment descriptor (freely translated as “application description ”) web.xml
that defines all servlets and other properties of the web application. Compiled Java classes are contained in a subdirectory called WEB-INF/classes
and required auxiliary libraries in WEB-INF/lib
. All files that are not in the WEB-INF directory are interpreted as static content of the web application, e.g. B. HTML pages, but also JavaServer Pages .
The following example shows a typical structure of a fictitious, very simple web archive .
/index.html /gaestebuch.jsp /images/logo.png /WEB-INF/web.xml /WEB-INF/classes/org/wikipedia/Util.class /WEB-INF/classes/org/wikipedia/MainServlet.class /WEB-INF/lib/util.jar /META-INF/MANIFEST.MF
The content can also be extracted.
Individual evidence
- ↑ Servlet Specification, Version 2.4 jcp.org - November 24, 2003