Sun Microsystems Logo



J2EETM 1.4 Application Server
Sample Applications
NOTE: Quickstart will be the only sample available if you download the J2EE(TM) 1.4 Application Server bundle. The J2EE(TM) 1.4 Tutorial is available for download from the J2EE web site. J2EE(TM) 1.4 BluePrints is available in three bundles: the J2EE 1.4 SDK bundle, the J2EE 1.4 Samples bundle, and as a separate download from the J2EE web site. The Sun Java System Application Server 8 bundle does not include the J2EE 1.4 BluePrints. If you install the Sun Java System Application Server 8 first and then you want to install the J2EE 1.4 BluePrints, you must unzip the J2EE 1.4 BluePrints into the installation directory of the Sun Java System Application Server 8. Otherwise, if you have downloaded and installed J2EE 1.4 SDK , your installation should already contain the necessary J2EE(TM) 1.4 BluePrints samples.  The J2EE 1.4 Tutorial will not be part of the J2EE(TM) 1.4 SDK bundle.

Samples Index

Complete index of sample applications provided as part of the application server.

Quick Start

Before working with the samples, ensure that you've followed the Quick Start Guide in order to familiarize yourself with the features and basic operation of the application server. The Quick Start Guide is available at <install_dir>/docs/QuickStart.html

Before Working With Samples

In addition to following the Quick Start Guide, it is recommended that you review the following sections prior to working with the sample applications.

1. Set Up Your Environment
Before deploying sample applications to Application Server, ensure your application server environment is functioning properly. The basic operations introduced in the Quick Start Guide will help ensure that your environment is configured properly. A key requirement prior to working with the samples is to ensure that the following directory is added to your PATH environment variable:

<install_dir>/bin

If you are either sharing your application server installation with other users or using a user ID that does not have write permissions to the area in which the application server is installed (for example, a non root user using an application server installed under /usr/appserver/ on Solaris[tm] 9), you should make a copy of the sample applications in your own directory before working with the samples. For more information on creating your own samples environment, see the section Creating Your Own Samples Environment.

2. Review Samples Directory Structure
The sample applications included in the application server installation are packaged according to a consistent structure. Each sample's directory structure represents a typical source code directory structure layout. For more information on the manner in which the samples are organized, see the section Samples Directory Structure.

3. Review Using Ant with the Samples
All of the samples include build.xml files that enable you to use the Java[tm]-based Ant build facility to easily recompile, reassemble and redeploy the sample applications. For more information on using Ant with the samples, see the section Using Ant with the Samples.

4. Review Using PointBase with the Samples
When the PointBase database server is installed as part of the application server installation, the database server includes a prepopulated database containing the tables and data required by the sample applications. For more information on how to use PointBase with the samples, see the section Using PointBase with the Samples. This section also addresses how to download, install and configure the PointBase server when you are using the application server that is installed as part of a Solaris 9 installation.

5. Review Using Oracle with the Samples
The samples which require databaseconnections can also work with an Oracle RDBMS. For more information on how to use an Oracle RDBMS with the samples, see the section Using Oracle with the Samples.

6. Rebuilding pre-built applications
NOTE: Pre-built applications are bundled with each example, so you can deploy the application without first having to rebuild it. However, if you plan to modify the source code and rebuild the application using asant core, the bundled pre-built application is no longer used when deploying the application, the rebuilt application is used for deployment instead. This rebuilt sample will be built in the assemble/ directory to avoid overwriting the original application and will ensure that the newly generated application (not the application that is originally bundled) is used for deployment.

7. Samples domain with pre-deployed applications
During installation you had the option of creating the samples administrative domain, which includes pre-deployed applications. You can see a list of these applications by running the asadmin list command or the Admin Console. To start the Admin Console for the samples domain, in a browser go to the following URL, replacing <hostname> with either localhost or the name of the remote host running the application server. The default port number for the admin server of the samples domain is 4858.

http://<hostname>:4858/asadmin

For further details on pre-deployed samples click here.

Obtaining Assistance

If you encounter problems while running the samples, please access the Sample Applications topic in the Application Server area of the Sun Software Forums.