The J2EETM Tutorial
Home
TOC
PREV TOC NEXT Search
Feedback

Web Components

by Stephanie Bodoff

When web-based clients of J2EE applications communicate with a J2EE server, they do so through server-side objects called web components. There are two types of web components: JavaTM Servlets and JavaServer PagesTM (JSPTM) pages. Servlets are Java programming language classes that dynamically process requests and construct responses. JSP pages are text-based documents that execute as servlets, but allow a more natural approach to creating static content. While servlets and JSP pages can be used interchangeably, each has its strengths. Servlets are best suited to managing the control functions of an application, such as dispatching requests, and handling non-textual data. JSP pages are more appropriate for generating text-based markup such as HTML, SVG, WML, and XML.

This chapter describes the packaging, configuration, and deployment procedures common to servlets and JSP pages. Subsequent chapters, Java Servlet Technology and JavaServer PagesTM Technology, cover how to develop the web components. Many features of JSP technology are determined by Java Servlet technology so you should familiarize yourself with that material, even if you do not intend to write servlets.

Most web-based J2EE clients use the HTTP protocol and support for HTTP is a major aspect of web components. For a brief summary of HTTP protocol features see HTTP Overview.

Web Component Life Cycle
Packaging Web Components
Creating a WAR
Adding a WAR to a J2EE Application
Adding a Web Component to a WAR
Configuring Web Components
Application-Level Configuration
WAR-Level Configuration
Component-Level Configuration
Deploying Web Components
Executing Web Components
Updating Web Components
Home
TOC
PREV TOC NEXT Search
Feedback