Sun Java System Web Server 6.1 SP7 Programmer's Guide to Web Applications

Web Application Structure

Web applications have a directory structure, which is 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 web application in compressed form.

A special directory under the document root, WEB-INF, contains information related to the application that is not in the public document tree. 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 J2SE specification. The following is an example directory structure of a simple web application:

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