Web modules

A web module represents a web application. 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 application 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 stand-alone applications, or you can combine web modules with other modules to create Java Platform, Enterprise Edition (Java EE) applications. You can also install and run a web module in the web container of an application server.