About Web Modules

See Also

A web module is the smallest deployable unit of web resources in a J2EE application. It corresponds to a "servlet context" as defined in the J2EE specification. Web module is a J2EE term that roughly corresponds to the term "web application" used in the JavaServer Pages Specification and Java Servlet Specification. JavaServer Pages (JSP) is a technology for creating dynamic content in web pages. Servlets are server-side Java classes that execute within a web server. To create, test, and debug web modules from the IDE, JSP pages and servlets must be placed inside the web module.

How the IDE Supports the Development of Web Modules

The IDE provides the following features to help increase web module development productivity:

Supported Technology Versions

The IDE supports the following versions for building, testing, and debugging web modules:

Web modules have a defined, hierarchical directory structure. The web module's root directory is the document base for files that are served directly to the client. The root directory contains a WEB-INFsubdirectory for files that are needed internally by the web module. Inside the WEB-INF directory is a classes subdirectory, a lib subdirectory, and a web.xml deployment descriptor file.

Web Module Structure and Components

A web module must contain a deployment descriptor file (WEB-INF/web.xml). A web module can contain:

A web module, when mounted in the IDE, corresponds to a filesystem. In other words, the root of a web module must be the same as the root of a filesystem in the Filesystems window. The web module root is often referred to as the document base.

warning  The web module must be mounted at its root directory. When mounted correctly, the WEB-INF directory displays the web module icon. If mounted incorrectly, the web module will not execute. To execute or debug JSP pages and servlets from the IDE, you must put them into a web module.

A web module is usually packaged and deployed as a WAR (web archive) file, although a web module does not always have to be packaged in order to be deployed.

For additional information on JSP and servlet technology, see:

See Also
About Deployment Descriptors
About Tag Libraries
About JavaServer Pages Technology
About Servlets
About Servlet Filters
About Servlet Listeners
About WAR Files
About JAR Files in Web Modules
Where to Put Web Module Files

Legal Notices