In the Java EE architecture, web components and static web content files such as images are called ''web resources''. A ''web module'' is the smallest deployable and usable unit of web resources. A Java EE web module corresponds to a ''web application'' as defined in the Java Servlet specification.

 {{attachment:web-module.gif}}

In addition to web components and web resources, a web module can contain other files:

Server-side utility classes (database beans, shopping carts, and so on). Often these classes conform to the JavaBeans component architecture.

Client-side classes (applets and utility classes).

A web module has a specific structure. The top-level directory of a web module 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.

A web module can be deployed as an unpacked file structure or can be packaged in a JAR file known as a ''web archive'' (WAR) file. Because the contents and use of WAR files differ from those of JAR files, WAR file names use a .war extension. The web module just described is portable; you can deploy it into any web container that conforms to the Java Servlet Specification.

To deploy a WAR on the Application Server, the file must also contain a runtime ''deployment descriptor'' (DD). The runtime deployment descriptor is an XML file that contains information such as the context root of the web application and the mapping of the portable names of an application’s resources to the Application Server’s resources. The Application Server web application runtime DD is located in the WEB-INF directory along with the web application DD.

== See Also ==
 * [[http://java.sun.com/javaee/5/docs/tutorial/doc/bnadx.html|Web Modules]], The Java EE 5 Tutorial
