Sun Logo


Building Web Components

Suntrademark ONE Studio 5 Programming Series

817-2334-10



Contents

Before You Read This Book

How This Book Is Organized

What Is Not in This Book

Useful References

Valuable Web Sites

Typographic Conventions

Related Documentation

Documentation Available Online

Online Help

Examples

Javadoc Documentation

Documentation in Accessible Formats

Contacting Sun Technical Support

Sun Welcomes Your Comments

1. Addressing the Challenges of Web Application Development

What Is a Web Application?

Challenges in Developing Web Applications

How Web Application Development is Different

Implications of Server-Centered Execution

How the IDE Helps

Full Web Component Support

Execution Support

Debugging and Monitoring Tools

Deployment Support

Open Runtime Environment Integration

Common Errors in Web Applications

Facing the Challenges of Web Application Debugging

Viewing Requests With the HTTP Monitor

Summary of IDE Features

2. The Structure of Web Modules

Web Servers

Servlet Containers and Web Components

Servlet Context

Web Modules

JSP Pages

JSP Page Life Cycle

Code Constructs in JSP Pages

HTTP Sessions

Scopes and Implicit Objects

Servlets

Servlet Life Cycle

Tag Libraries

JSP Standard Tag Library

Servlet Filters

Filter Life Cycle

Listeners

3. Design Patterns and Frameworks

Design Patterns

Front Controllers

Composite Views

View Creation Helpers

Model Objects

Frameworks

Struts

JavaServer Faces

4. Developing Your Own Web Application

Development Work Flow

Web Modules in the IDE

Creating a Web Module

Importing an Existing Web Module

Creating JSP Pages

Using page Directives

Creating and Invalidating Sessions

Modifying the JSP File

Working With JSP Includes

Creating a Composite View Template

Using Additional Classes or Beans

Creating Servlets

Declaring the Servlet in the Deployment Descriptor

Modifying the Servlet

Servlet-Generated HTTP Responses

Using the Servlet as a Front Controller

Using Additional Classes or Beans

Creating Filters

Declaring the Filter in the Deployment Descriptor

Processing HTTP Requests and Responses

Using Tag Libraries

Using Existing Tag Libraries

Tag Library Descriptors

Inserting Custom Actions From a Tag Library Into a JSP Page

Developing Your Own Tag Libraries

Testing Tag Libraries

Working With Databases

5. Running, Debugging, and Deploying Your Web Application

Running and Debugging Tasks

Configuring the Web Module Deployment Descriptor

Using Property Sheets to Edit the web.xml File

Registering Servlets and Filters

Registering Tag Libraries

Specifying the Default URI Within the Taglib Element

Using the IDE to Edit the web.xml File in the Source Editor

Using the Integrated Servers

Test Running Web Modules

Configuring the Server

Setting Up the Web Server Environment for Database Access

Executing a Single Web Module

Creating and Executing a Web Module Group

Executing on External Servers

Debugging Web Applications

Using the HTTP Monitor to Debug a Web Application

Source-Level Debugging

Packaging Your Web Applications

Building a WAR File From a Web Module

Specifying Options

Viewing Contents

Packaging and Deploying a Custom Tag Library

Packaging a Tag Library as a JAR File

Deploying a Tag Library Using the Tag Library Repository

Deploying a Tag Library by Adding a JAR File From the Filesystem

Deploying a Tag Library by Copying and Pasting a JAR File From Another Module or Filesystem

Including a Web Module Within a J2EE Application

Glossary

Index