Sun Java System Web Server 7.0 Update 3 Developer's Guide to Java Web Applications

Web Application Structure

Web applications have a directory structure, which is fully accessible from a mapping to the application's document root (for example, /hello). The document root contains JSP files, HTML files, and static files such as image files.

A WAR file (web archive file) contains a complete web application in compressed form.

A special directory under the document root, WEB-INF, contains everything related to the application that is not in the public document tree of the application. No file contained in WEB-INF can be served directly to the client. The contents of WEB-INF include:

The web application directory structure follows the structure outlined in the Java EE specification. The following example shows a sample directory structure of a simple web application.

+ hello/
       |--- index.jsp
       |--+ META-INF/
       |  |--- MANIFEST.MF
       --+ WEB-INF/
          |--- web.xml
          --- sun-web.xml