About This Tutorial

Who Should Use This Tutorial

How to Read This Tutorial

About the Examples

How to Print This Tutorial

Typographical Conventions

Chapter 1:   Introduction to Web Services

The Role of XML and the JavaTrademarked Platform

What Is XML?

Overview of the Java APIs for XML

JAXP

JAXB

JAX-RPC

JAXM

JAXR

Sample Scenario

Chapter 2:   Understanding XML

Introduction to XML

XML and Related Specs: Digesting the Alphabet Soup

Designing an XML Data Structure

Chapter 3:   Getting Started With Tomcat

Setting Up

Quick Overview

Creating the Getting Started Application

Building the Getting Started Application Using Ant

Deploying the Application

Running the Getting Started Application

Using admintool

Modifying the Application

Common Problems and Their Solutions

Further Information

Chapter 4:   Web Applications

Web Application Life Cycle

Web Application Archives

Configuring Web Applications

Installing Web Applications

Deploying Web Applications

Listing Installed and Deployed Web Applications

Running Web Applications

Updating Web Applications

Removing Web Applications

Undeploying Web Applications

Internationalizing and Localizing Web Applications

Accessing Databases from Web Applications

Further Information

Chapter 5:   Java API for XML Processing

The JAXP APIs

An Overview of the Packages

The Simple API for XML (SAX) APIs

The Document Object Model (DOM) APIs

The XML Stylesheet Language for Transformation (XSLT) APIs

Compiling and Running the Programs

Where Do You Go from Here?

Chapter 6:   Simple API for XML

When to Use SAX

Writing a Simple XML File

Echoing an XML File with the SAX Parser

Adding Additional Event Handlers

Handling Errors with the Nonvalidating Parser

Substituting and Inserting Text

Creating a Document Type Definition (DTD)

DTD's Effect on the Nonvalidating Parser

Defining Attributes and Entities in the DTD

Referencing Binary Entities

Choosing your Parser Implementation

Using the Validating Parser

Defining Parameter Entities and Conditional Sections

Parsing the Parameterized DTD

Handling Lexical Events

Using the DTDHandler and EntityResolver

Further Information

Chapter 7:   Document Object Model

When to Use DOM

Reading XML Data into a DOM

Displaying a DOM Hierarchy

Examining the Structure of a DOM

Constructing a User-Friendly JTree from a DOM

Creating and Manipulating a DOM

Using Namespaces

Validating with XML Schema

Further Information

Chapter 8:   XML Stylesheet Language for Transformations

Introducing XSLT and XPath

Choosing the Transformation Engine

How XPath Works

Writing Out a DOM as an XML File

Generating XML from an Arbitrary Data Structure

Transforming XML Data with XSLT

Transforming from the Command Line

Concatenating Transformations with a Filter Chain

Further Information

Chapter 9:   Binding XML Schema to Java Classes with JAXB

JAXB Architecture

XML Schemas

Representing XML Content

Binding XML Schemas

Customizing JAXB Bindings

What is Not Supported

JAXB APIs and Tools

Chapter 10:   Using JAXB

General Usage Instructions

Basic Sample Applications

Customizing JAXB Bindings

Chapter 11:   Building Web Services With JAX-RPC

A Simple Example: HelloWorld

Types Supported By JAX-RPC

A Dynamic Proxy Client Example

A Dynamic Invocation Interface (DII) Client Example

The wscompile Tool

The wsdeploy Tool

Advanced Topics for wscompile and wsdeploy

Further Information

Chapter 12:   Web Services Messaging with JAXM

The Structure of the JAXM API

Overview of JAXM

Running the Samples

Tutorial

Code Examples

Further Information

Chapter 13:   Publishing and Discovering Web Services with JAXR

Overview of JAXR

Implementing a JAXR Client

Running the Client Examples

Further Information

Chapter 14:   Java Servlet Technology

What is a Servlet?

The Example Servlets

Servlet Life Cycle

Sharing Information

Initializing a Servlet

Writing Service Methods

Filtering Requests and Responses

Invoking Other Web Resources

Accessing the Web Context

Maintaining Client State

Finalizing a Servlet

Further Information

Chapter 15:   JavaServer Pages Technology

What Is a JSP Page?

The Example JSP Pages

The Life Cycle of a JSP Page

Initializing and Finalizing a JSP Page

Creating Static Content

Creating Dynamic Content

Including Content in a JSP Page

Transferring Control to Another Web Component

Including an Applet

JavaBeans Components in JSP Pages

Extending the JSP Language

Further Information

Chapter 16:   Custom Tags in JSP Pages

What Is a Custom Tag?

The Example JSP Pages

Using Tags

Defining Tags

Examples

Chapter 17:   JavaServer Pages Standard Tag Library

The Example JSP Pages

Using JSTL

Expression Language Support

Core Tags

XML Tags

Internationalization Tags

SQL Tags

Further Information

Chapter 18:   Security

Overview

Users, Groups, and Roles

Web-Tier Security

Installing and Configuring SSL Support

Security for JAX-RPC

EIS-Tier Security

Chapter 19:   The Coffee Break Application

Coffee Break Overview

JAX-RPC Distributor Service

JAXM Distributor Service

Coffee Break Server

Building, Installing, and Running the Application

Appendix A:   Tomcat Administration Tool

Running admintool

Configuring Tomcat

Configuring Services

Configuring Resources

Administering Roles, Groups, and Users

Further Information

Appendix B:   Tomcat Web Application Manager

Running the Web Application Manager

Running Manager Commands Using Ant Tasks

Appendix C:   The Java WSDP Registry Server

Starting the Registry Server

Using JAXR to Access the Registry Server

Using the Command Line Client Script to Access the Registry Server

Further Information

Appendix D:   Registry Browser

Starting the Browser

Querying a Registry

Managing Registry Data

Deleting an Organization

Stopping the Browser

Appendix E:   Provider Administration Tool

Appendix F:   HTTP Overview

HTTP Requests

HTTP Responses

Appendix G:   Java Encoding Schemes

Further Information

Glossary

About the Authors

Index