A Web module represents a web application (.war). A Web module is created by assembling servlets, JSP files, and static content such as HTML pages into a single deployable unit. Web modules are stored in Web archive (WAR) files, which are standard Java archive files.
A Web module contains:
- One or more servlets, JSP files, and HTML files.
- A deployment descriptor, stored in an XML file.
The file, named web.xml, declares the contents of the module. It contains information about the structure and external dependencies of Web components in the module and describes how the components are used at run time.
You can create Web modules as stand-alone applications, or you can combine Web modules with other modules to create J2EE applications. You install and run a Web module in the Web container of an appserver.