WAR (file format)

Web archives or web application archive is a file format that describes how a complete web application by the Java Servlet specification is packaged in a file in the JAR or ZIP format. Such files always have the extension ". Was " and therefore also colloquially called " WAR file ".

Structure

For Web applications, according to the servlet specification a specific directory structure is required, which can also be found in the WAR files.

In addition to the prescribed for all JAR files file " META-INF/MANIFEST.MF " each WAR file contains a directory " WEB -INF ", in which a so-called deployment descriptor ( freely translated as " application description") called "web. xml " is defining all servlets and other properties of the Web application. Compiled Java classes are included in a sub-directory called " WEB-INF/classes " and needed support libraries in " WEB-INF/lib ". All files are not located in the WEB- INF directory are interpreted as static content of the Web application, such as HTML pages, but also Java Server Pages.

The following example shows a typical structure of a fictional, very simple web archive.

  • Java ( programming language)
  • Data format
432484
de