You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Martin edited this page Mar 15, 2018
·
2 revisions
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.