Java web applications are distributed in WAR (Web application Archive) files. A WAR file is a compressed file that keeps the structure of web applications (apart from the web application context directory, which is the application's top directory), and includes one extra folder named META-INF
. These compressed files have a .war
extension. The META-INF
folder contains metadata about the files within a WAR file. An important file kept in this folder is the MANIFEST.MF
file. Among other things, such a special file has information about the files packaged in a WAR file.
When WAR files are deployed, they are unpacked by the container, which creates the structure shown in the following figure. The name of the top directory depends on the container in question. Tomcat, for instance, names the top directory after the WAR file. So, for instance, the following structure would be created by Tomcat upon unpacking a deployedapp.war
file. As you can see, the internal structure of a...