Sun Cluster Data Service for Apache Tomcat Guide for Solaris OS

Verifying the Installation and Configuration of Apache Tomcat

This section contains the procedure you need to verify the installation and configuration of Apache Tomcat.

ProcedureHow to Verify the Installation and Configuration of Apache Tomcat

This procedure does not verify that your application is highly available because you have not installed your data service yet.

Steps
  1. Start the Apache Tomcat.

    Switch to the Tomcat user name (in the following example, it is root) and change to the directory where the environment script is located. In the following example the Tomcat version is 4.1.24.


    Note –

    The output messages of the start and shutdown commands are highly version dependent.



     # . ./env.ksh
    # cd $CATALINA_HOME/bin
    # ./startup.sh
    Using CATALINA_BASE:   /tomcat/jakarta-tomcat-4.1.24
    Using CATALINA_HOME:   /tomcat/jakarta-tomcat-4.1.24
    Using CATALINA_TMPDIR: /tomcat/jakarta-tomcat-4.1.24/temp
    Using JAVA_HOME:       /usr/j2se
  2. Check the Installation

    Start a web browser and connect to the cluster node with http://nodename:8080. If you see the default Tomcat homepage everything is working correctly.

  3. Stop the Apache Tomcat.


     # ./shutdown.sh
    Using CATALINA_BASE:   /tomcat/jakarta-tomcat-4.1.24
    Using CATALINA_HOME:   /tomcat/jakarta-tomcat-4.1.24
    Using CATALINA_TMPDIR: /tomcat/jakarta-tomcat-4.1.24/temp
    Using JAVA_HOME:       /usr/j2se

ProcedureHow to Deploy the Apache Tomcat Application

If you configure Apache Tomcat as a failover resource, execute the following steps on one node. If you deploy Apache Tomcat as a scalable configuration, repeat the following steps on every node.


Caution – Caution –

It is vital for a scalable configuration that the Apache Tomcat configuration does not differ on the Tomcat hosts.


Steps
  1. Modify the configuration files server.xml and the Tomcat user configuration to the desired content.

    For further information refer to http://jakarta.apache.org/tomcat/index.html.

  2. Start Apache Tomcat as described in How to Verify the Installation and Configuration of Apache Tomcat.

  3. Deploy your Application.

    For further information refer to http://jakarta.apache.org/tomcat/index.html.

  4. Test your application with appropriate methods.

    For example, connect with a web browser to the Host with the appropriate port and select the start page of your application.

  5. Stop Apache Tomcat as described in How to Verify the Installation and Configuration of Apache Tomcat.

    The port on which Apache Tomcat is serving is required for the configuration of the Sun Cluster Apache Tomcat resource.

    It is best practice to use the start page of the deployed application for the Fault Monitoring. In this case the TestCmd is described in Understanding the Sun Cluster Apache Tomcat HA Parameter File can be get /start_page. With this procedure, you monitor Apache Tomcat and the application it is serving.