Sun Java System Application Server 

The Cluster JSP Sample Application

The cluster JSP sample application demonstrates how a request to a JSP is shared or load balanced between all server instances in a cluster, with the HttpSession or "shopping cart" information surviving an abnormal condition in any server in a cluster.  Simulated outages will demonstrate both failover and high availability.  The Load Balancer will distribute requests to all instances in the cluster. It has the ability to forward a request to a healthy instance if it detects that the target instance is unavailable.

Building, Deploying, and Running the Application

The general instructions for building, deploying, and running sample applications are provided in Building, Deploying, and Running Sample Applications. In reading this document, use the following application-specific variables for this application:

Follow this general procedure:

  1. Follow the instructions in Setting Up Sample Application for Clustering, Loadbalancing to configure the load balancer for an Application Server cluster.
  2. Deploy the Application The EAR file is install_dir/samples/quickstart/clusterjsp/clusterjsp.ear.
    Note:Build Target asant deploy uses samples/common.properties which has your Application Server host name, administration port, administration user and password and cluster name. 
  3. Run the application, as described below.

Running the Sample Application

After you have built and deployed the application, run it by entering the following URL in your web browser:

http://ws-host:ws-port/clusterJSP

Where ws-host is the hostname of web server with the load balancer plugin and ws-port is the port one which the web server is running. Then, follow these instructions to use the application to demonstrate clustering:

The images from running the application:

For instructions no how to stop and cleanup an clusters and nodeagents, see Stop and Cleanup cluster settings.


Copyright © 2005 Sun Microsystems, Inc. All rights reserved.