sun.com docs.sun.com My Sun Worldwide Sites

  Previous Contents Next

Preface

This is the The Sun Web Developer Pack Tutorial, a tutorial that covers emerging web technologies like Ajax, REST web services, and scripting language-based web applications. 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 who are interested in developing and deploying interactive and dynamic web applications on the Sun Java System Application Server 9.1application server.

About the Examples

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

Required Software

The following software is required to run the examples.

Tutorial Bundle

The tutorial example source is contained in the tutorial bundle. You can download the tutorial from http://developers.sun.com/web/swdp/docs/tutorial/download.html. After you have installed the tutorial bundle, the example source code is in the INSTALL/swdp-tutorial-2.0/examples/ directory, where INSTALL is the directory where you installed the tutorial. The examples directory contains subdirectories for each of the technologies discussed in the tutorial.

Java 2 Platform, Standard Edition

To build, deploy, and run the examples, you need a copy of Java 2 Platform, Standard Edition 5.0 (J2SE 5.0). You can download the J2SE 5.0 software from http://java.sun.com/javase/downloads/index_jdk5.jsp. Download the current JDK update that does not include any other software (such as the NetBeans IDE or Java EE). Note that the tutorial examples encounter library conflicts with Java SE 6.0, so we recommend that you use J2SE 5.0 instead.

GlassFish v2 Application Server

GlassFish v2 Application Server (or the Sun Java System Application Server 9.1) is targeted as the build and runtime environment for the tutorial examples. To build, deploy, and run the examples, you need a copy of the Application Server and, optionally, NetBeans IDE 5.5.1. You can download GlassFish v2 from https://glassfish.dev.java.net/downloads/v2-b41d.html.

Sun Web Developer Pack Release 2 Bundle

The Sun Web Developer Pack Release 2 (R2) bundle contains all the technologies described in this tutorial. To obtain this bundle, go to http://developers.sun.com/web/swdp/ and click the download link for Release 2. For information about installing Sun Web Developer Pack, go to http://developers.sun.com/doc/web/swdp/docs/ and click the link to the Release 2 installation instructions.

NetBeans IDE 5.5.1

The NetBeans integrated development environment (IDE) is a free, open-source IDE for developing Java applications, including enterprise applications. NetBeans IDE 5.5.1 supports the Java EE 5 platform. You can build, package, deploy, and run the tutorial examples from within NetBeans IDE 5.5.1.

Sun Web Developer Pack R2 Plug-In Module for the NetBeans IDE

Download and integrate the Sun Web Developer Pack R2 plug-in module, an umbrella plug-in module that adds functionality used by the technologies in the Sun Web Developer Pack to the NetBeans IDE 5.5.1:

  1. Choose Tools→Update Center.

  2. Select NetBeans Update Center Beta. Click Next.

  3. Select Sun Web Developer Pack R2 in the Available Updates and New Modules pane and click Add to move the items to the Include in Install pane.

  4. Click Next and then click Accept in the Licensing dialog.

  5. Click Next when the IDE finishes downloading the modules from the Update Center.

  6. Select all of the downloaded modules and click Finish.

  7. Select Tools→Options→Miscellaneous.

  8. Expand Web Pack Options and browse to the location of your Sun Web Developer Pack installation.

  9. Click OK.

Apache Ant

Ant is a Java technology-based build tool developed by the Apache Software Foundation (http://ant.apache.org), and is used to build, package, and deploy the tutorial examples. Ant is included with the Application Server. To use the ant command, add JAVAEE_HOME/lib/ant/bin to your PATH environment variable.

Building the Examples

The tutorial examples are distributed with a configuration file for either NetBeans IDE 5.5.1 or Ant. Directions for building the examples are provided in each chapter. Either NetBeans IDE 5.5.1 or Ant may be used to build, package, deploy, and run the examples.

Building the Examples Using NetBeans IDE 5.5.1

To run the tutorial examples in NetBeans IDE 5.5.1, you must register your Application Server installation as a NetBeans Server Instance. Follow these instructions to register the Application Server in NetBeans IDE 5.5.1.

  1. Select Tools-->Server Manager to open the Server Manager dialog.
  2. Click Add Server.
  3. Under Server, select Sun Java System Application Server and click Next.
  4. Under Platform Location, enter the location of your Application Server installation.
  5. Select Register Local Default Domain and click Next.
  6. Under Admin Username and Admin Password, enter the admin name and password created when you installed the Application Server.
  7. Click Finish.
Previous Contents Next
Company Info Contact Terms of Use Privacy Copyright 1994-2007 Sun Microsystems, Inc.