Web modules

A Web module represents a Webapp. A Web module is created by assembling servlets, JavaServer Pages (JSP) files, and static content such as HyperText Markup Language (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 Extensible Markup Language (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 standalone 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.