Download
FAQ
History
PrevHomeNext API
Search
Feedback
Divider

Web Applications

Web components and static Web content files such as images are called Web resources. A Web application is the smallest deployable and usable unit of Web resources.

A Web application is typically packaged and deployed as a Web archive (WAR) file. The format of a WAR file is identical to that of a JAR file. However, the contents and use of WAR files differ from JAR files, so WAR file names use a .war extension.

In addition to Web components and Web resources, a Web application can contain other files including:

The top-level directory of a Web application is the document root of the application. The document root is where JSP pages, client-side classes and archives, and static Web resources, such as images, are stored.

The document root contains a subdirectory called /WEB-INF/, which contains the following files and directories:

You can also create application-specific subdirectories (that is, package directories) in either the document root or the /WEB-INF/classes/ directory.

The WAR structure just described is portable; you can install it into any container that conforms to the Java Servlet Specification.

Divider
Download
FAQ
History
PrevHomeNext API
Search
Feedback
Divider

All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.