WAR Structure - Pooky/java-enterprise-examples GitHub Wiki
WAR. Web Archive structure
Java pack result code in specified folder structure, this structure is differend from regular .jar file in many ways. Most important, there is WEB-INF folder, in which are classes and libs, which are needed for Tomcat, JBoss or any other Servlet container (Web Server) to run this application.
The structure of this .war file is important. If you pack your project differently, then the WebServer can't deploy the .war file and will fail. Also, during debug is usually nice to check, if you .war file is packed correctly and everything is on same place.
Very specific is file web.xml. This file used to be required but since Servlet Version 3.0 it's optional. This file specify starting point (servlet), which should WebServer use. It specify mapping of url (like .httaccess), filters, display-name and many more information.
* Root of web App
* WEB-INF
* classes
* lib
* web.xml
* META-INF
* Manifest.MF
* jsp
* index.jsp