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-1.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, either standalone or integrated into the SDK) 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 Beta. You can download GlassFish v2 from https://glassfish.dev.java.net/downloads/v2-b33.html. You can download the Application Server 9.1 Beta or the Java Application Platform SDK Update 3 Preview from http://java.sun.com/javaee/downloads/ea/. In the section entitled "Java Application Platform SDK Update 3 Preview" and click the Download with Tools button. This SDK contains Sun Java System Application Server 9.1 Beta and NetBeans IDE 5.5.1 Beta.

Java EE 5 SDK Installation Tips

In the Admin configuration pane of the SDK installer:

  • Accept the default admin user name and password. The user name is admin, and the password is adminadmin. You will need this user name and password to log in to the Application Server Admin Console.

  • Note the HTTP port at which the server is installed. This tutorial assumes that you are accepting the default port of 8080. If 8080 is in use during installation and the installer chooses another port or if you decide to change it yourself, you will need to update the common build properties file (described in the next section) and the configuration files for some of the tutorial examples to reflect the correct port.

This tutorial refers to the directory where you install the Application Server as <JAVAEE_HOME>. For example, the default installation directory on Microsoft Windows is C:\Sun\SDK, so <JAVAEE_HOME> is C:\Sun\SDK.

NetBeans IDE 5.5.1 Beta

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

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

Download and integrate the Sun Web Developer Pack R1 plug-in module, an umbrella plugin-module that adds functionality used by the technologies in the Sun WDP 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 R1 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 WDP 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 5.5.1 Beta or Ant. Directions for building the examples are provided in each chapter. Either NetBeans 5.5.1 Beta or Ant may be used to build, package, deploy, and run the examples.

Building the Examples Using NetBeans IDE 5.5.1 Beta

To run the tutorial examples in NetBeans IDE 5.5.1 Beta, 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.