Download FAQ History |  | API Search Feedback

> ## About This Tutorial

> This tutorial is a beginner's guide to developing enterprise applications using the Java Web Services Developer Pack (Java WSDP). The Java WSDP is an all-in-one download containing key technologies to simplify building of Web services using the Java 2 Platform. This tutorial requires a full installation (Typical, not Custom) of the Java WSDP. Here we cover all the things you need to know to make the best use of this tutorial.

> ## Who Should Use This Tutorial

> This tutorial is intended for programmers interested in developing and deploying Web services and Web applications on the Java WSDP.

> ## How to Read This Tutorial

> This tutorial is organized into six parts:

> - Introduction

> The first five chapters introduce basic concepts and technologies and we suggest that you read these first in their entirety. In particular, many of the Java WSDP examples run on the Tomcat Java servlet and JSP container and the Getting Started with Tomcat chapter tells you how to start, stop, and manage Tomcat.

> - Java XML technology

> These chapters cover the technologies for developing applications that process XML documents and provide Web services:

> - The Java API for XML Processing (JAXP)
> - The Java API for XML-based RPC (JAX-RPC)
> - SOAP with Attachments API for Java (SAAJ)
> - The Java API for XML Registries (JAXR)
> - The Java Architecture for XML Binding (JAXB)
> - Web technology

> These chapters cover the component technologies used in developing the presentation layer of aWeb application.

> - Java Servlets
> - JavaServer Pages
> - JavaServer Pages Standard Tag Library
> - JavaServer Faces
> - Case Study

> The Coffee Break Application chapter in this part describes an application that ties together most of the APIs discussed in this tutorial.

> - Appendixes
> - Tomcat Server Administration Tool
> - Tomcat Web Application Manager
> - Registry Browser
> - Java encoding schemes
> - HTTP overview

> ## About the Examples

> ### Prerequisites for the Examples

> To understand the examples you will need a good knowledge of the Java programming language, SQL, and relational database concepts. The topics listed in Table P-1 The Java Tutorial are particularly relevant:

> Table P-1 Relevant Topics in The Java Tutorial
> Topic | Web Page
> --- | ---
> JDBC | `http://java.sun.com/docs/books/tutorial/jdbc`
> Threads | `http://java.sun.com/docs/books/tutorial/essential/threads`
> JavaBeans | `http://java.sun.com/docs/books/tutorial/javabeans`
> Security | `http://java.sun.com/docs/books/tutorial/security1.2`

> ### Building and Running the Examples

> This section tells you everything you need to know to obtain, build, and run the examples.

> #### Required Software

> If you are viewing this online, you need to download The Java Web Services Tutorial from:

>     http://java.sun.com/webservices/downloads/webservicestutorial.html

> Once you have installed the tutorial bundle, the example source code is in the `<``INSTALL``>/jwstutorial12/examples/` directory, with subdirectories for each of the technologies included in the pack except for the JavaServer Faces and JAXB technologies. The examples for these technologies are included in the Java WSDP in the `<``JWSDP_HOME``>/jsf/samples` and `<``JWSDP_HOME``>/jaxb/samples` directories.

> This tutorial documents the Java WSDP 1.2. To build, deploy, and run the examples you need a copy of the Java WSDP and the Java 2 Software Development Kit, Standard Edition (J2SE SDK) 1.4.1 or higher. You download the Java WSDP from:

>     http://java.sun.com/webservices/downloads/webservicespack.html

> and the J2SE 1.4 SDK from

>     http://java.sun.com/j2se/1.4/

> #### Building the Examples

> Most of the examples are distributed with a build file for `Ant` 1.5.1, a portable build tool contained in the Java WSDP. Directions for building the examples are provided in each chapter.

> In order to run the `Ant` scripts, you must configure your environment and properties files as follows:

> - Add `<``JAVA_HOME``>/bin` to the front of your path.
> - Add `<``JWSDP_HOME``>/bin` to the front of your path so that JWSDP 1.2 scripts override other installations.
> - Add `<``JWSDP_HOME``>/apache-ant/bin` to the front of your path so that JWSDP 1.2 `Ant` script overrides other installations. The version of Ant shipped with the Java WSDP sets the `jwsdp.home` environment variable, which is required by the example build files. If you do not use this version of Ant, you will need to set the `jwsdp.home` property in the `build.properties` file described in the next bullet.
> - Set the following properties in the file `<``INSTALL``>/jwstutorial12/examples/common/build.properties:`
> - Set `tutorial.home` to the location of your Java Web Services Tutorial installation.
> - Set the `username` and `password` properties to the values you specified when you installed the Java WSDP. The build scripts use these values when you invoke an administration task such as installing an application.

> #### Tutorial Example Directory Structure

> To facilitate iterative development and keep application source separate from compiled files, the source code for the tutorial examples is stored in the following structure under each application directory:

> - `build.xml`--`Ant` build file
> - `src`--Java source of servlets and JavaBeans components, and tag libraries
> - `web`--JSP pages and HTML pages, tag files, images

> The `Ant` build files (`build.xml`) distributed with the examples contain targets to create a `build` subdirectory and copy and compile files into that directory and perform administrative functions on the application server. Build properties and targets common to a particular technology are specified in the files`` `<``INSTALL``>/jwstutorial12/examples/technology/common/build.properties` and `<``INSTALL``>/jwstutorial12/examples/technology/common/targets.xml`.

> #### Managing the Examples

> Many of the Java WSDP examples run on the Tomcat Java servlet and JSP container. You use the `manager` tool to list, install, list, reload, remove, deploy, and undeploy Web applications. See Appendix B for information on this tool.

> ## How to Print This Tutorial

> To print this tutorial, follow these steps:

> 1. Ensure that Adobe Acrobat Reader is installed on your system.
> 2. Open the PDF version of this book.
> 3. Click the printer icon in Adobe Acrobat Reader.

> ## Typographical Conventions

> Table P-2 lists the typographical conventions used in this tutorial.

> Table P-2 Typographical Conventions
> Font Style | Uses
> --- | ---
> italic | Emphasis, titles, first occurrence of terms
> `monospace` | URLs, code examples, file names, command names, programming language keywords
> `italic monospace` | Variable names
> <`italic monospace>` | Environment variables

> Menu selections indicated with the right-arrow character , for example, FirstSecond, should be interpreted as: select the First menu, then choose Second from the First submenu.

Download FAQ History |  | API Search Feedback

All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.