The balancer webapp is an implementation of a rules-based load balancer. A number of rules are provided and the application is written for easy extensibility.

A servlet filter is also provided along with a sample web.xml that maps that filter to all requests. This is only one way to use the load balancer. The user may configure multiple filters each with a different rule chain mapped to (possibly multiple) different url-patterns or servlets. It is also possible to use rule chains within a servlet.

Please note that although this application is being distributed with Tomcat, it is compliant with the Servlet Specification v2.3 and is therefore portable across servlet containers that support this specification.

The balancer webapps uses the Digester tool from Apache Commons. Digester and its dependencies are included in this distribution.

The balancer webapp uses Jalopy for source-code formatting and CheckStyle for source-code checking.
The CheckStyle Report is available.

Any suggestions, comments, etc, are welcome: please post them to the tomcat-user mailing list. Enjoy ;)