Sun Cluster 3.1 Data Service for Apache Tomcat Guide

Strategy to chose the TestCmd and the ReturnString variable

Some alternatives are available to chose the ReturnString:

  1. Take the Startpage of your application and set the TestCmd to get /startpage. In this case, set the ReturnString to a string contained in the startpage. With this strategy, you are monitoring that Apache Tomcat is serving your application.

  2. Take the Apache Tomcat default startpage and set the TestCmd to get /default-startpage. In this case, set the ReturnString to a string contained in the startpage. This string depends on the deployed Apache Tomcat version, for 3.x it is Tomcat home and for 4.x it is CATALINA. With this strategy, you are monitoring that Apache Tomcat is serving it's default application.

  3. Deploy a test application (which is not provided with the Sun Cluster Apache Tomcat agent) to Apache Tomcat. Set the TestCmd to get /startpage-of-the-application. In this case, set he ReturnString to a string contained in the startpage. With this strategy, you are monitoring that Apache Tomcat is serving your test application.

  4. If none of above is appropriate, set the TestCmd to get /a-page-which-does-not-exists. In this case set he ReturnString to a string contained in the Error Page. With this strategy, you are monitoring that Apache Tomcat is operational, because it realizes that it has to deliver a page which does not exist.

You can evaluate the different pages by connecting with a browser with hostname:port and specify the different pages.