background image

Web Modules

<< Web Application Life Cycle | Document Root of the Application. >>
<< Web Application Life Cycle | Document Root of the Application. >>

Web Modules

The Hello application contains two web components that generate the greeting and the
response. This chapter discusses two versions of the application: a JSP version called hello1, in
which the components are implemented by two JSP pages
(tut-install/javaeetutorial5/examples/web/hello1/web/index.jsp and
tut-install/javaeetutorial5/examples/web/hello1/web/response.jsp) and a servlet
version called hello2, in which the components are implemented by two servlet classes
(tut-install/javaeetutorial5/examples/web/hello2/src/servlets/GreetingServlet.java
and
tut-install/javaeetutorial5/examples/web/hello2/src/servlets/ResponseServlet.java).
The two versions are used to illustrate tasks involved in packaging, deploying, configuring, and
running an application that contains web components. The section
Chapter 2, "Using the
Tutorial Examples"
explains how to get the code for these examples.
After you install the tutorial bundle, the source code for the examples is in the following
directories:
tut-install/javaeetutorial5/examples/web/hello1/
tut-install/javaeetutorial5/examples/web/hello2/
Web Modules
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.
FIGURE 3­4
Response
Web Modules
Chapter 3 · Getting Started with Web Applications
81