Create a load balancer using the Admin Console. Alternatively, you can use the asadmin create-http-lb(1) command.
Click the HTTP Load Balancers node in the Admin Console.
Type lb1 as the name of the load balancer, the host on which Web Server is installed, and the Web Server instance port. In this sample scenarios Web Server host is localhost and the port is 38000.
Select the Apply Changes Automatically check box. If you choose this option, you do not have to export the load balancer configuration. All changes you make to the load balancer configuration are propagated automatically.
Select cluster1 as target.
Creating a Cluster explains how to create a sample cluster (cluster1)
Enable cluster1 for load balancing:
asadmin enable-http-lb-server cluster1
Enable the clusterjsp application for load balancing:
asadmin enable-http-lb-application clusterjsp.
For information on advanced topics, such as changing the load balancer configuration or creating health checkers, see the Chapter 4, Configuring HTTP Load Balancing, in Sun GlassFish Enterprise Server 2.1 High Availability Administration Guide.