Understanding WAR

WAR (Web application ARchive) files are used to distribute Java-based web applications. A WAR has the same file structure as a JAR file, which is a single compressed file that contains multiple files bundled inside it.

WAR files are used to combine JSPs, servlets, Java class files, XML files, javascript libraries, JAR libraries, static web pages, and any other resources needed to run the application.

WAR files are usually deployed in servlet containers, but can also be deployed to Java EE application servers. When a WAR file is deployed to a container, the container usually unpacks it to access the files and then launches the application. With servlet containers being the most prolific platform for Java web applications, WAR files are not only a Java spec standard, but a very common format for distributing Java applications and supported by a wide range of tools.

WAR files cannot be edited while the application is running. Any changes require rebuilding the file.