NOTE: In an HP-UX 11.x environment, the Tomcat server is usually installed in the location /opt/ hpws22/tomcat and the default configuration file server.xml resides in the conf sub-directory under this directory. If HP-UX WSS 2.X is installed, then the Tomcat server will be installed in the location /opt/hpws/tomcat.

Tomcat Package Configuration Overview

Tomcat starts up by reading the server.xml file from the conf sub-directory of the CATALINA_BASE directory which is configured in the toolkit user configuration file hatomcat.conf.

The configuration rules include the following:Each node must have the same version of the HP-UX based Tomcat Servlet Engine.

Each node must have the same CATALINA_BASE directory where identical copies of the configuration file for each instance are placed.

Each node must have the same document root directory where identical copies of the web document for each instance are placed.

Tomcat servlet engine can be configured in two different ways:

Local Config: Putting the configuration and other web-site files on a single node, and then replicating the files to all other nodes in the cluster

Shared config: with configuration files and document root files in a shared file system

NOTE: Under a shared configuration, you can choose to put tomcat binaries as well in a shared file system. The steps to configure this is covered in this document later.

Local Configuration

In a typical local configuration, nothing is shared between the nodes. Identical copies of the Tomcat server configuration file and web documents reside in exactly the same locations on each node. The user is responsible for maintaining identical copies of the tomcat components on the different nodes. This is useful when the information on the web-page is static.

If the user chooses to use this configuration, it is the user's responsibility to ensure the data is propagated to all nodes, and is consistently maintained. A disadvantage of storing the configuration on local disks is that this can increase the chance of the configuration for a Tomcat instance becoming inconsistent if changes are made, but not distributed to all nodes that can run that Tomcat instance.

Shared Configuration

In a typical shared configuration, the web application directories are all on the shared file system. (Placing the CATALINA_BASE directory in the shared file system is optional.) Since the web applications (along with the tomcat configuration directory) are on shared storage - accessible to all nodes in the cluster - there is no need to maintain local identical copies of the files on each node. The mount point of the shared file system should be identical across all the tomcat package nodes. Hence this is the recommended Tomcat package configuration.

Each web site is assigned IP addresses (or domain addresses that maps to particular IP addresses) through the configuration file. These relocatable IP addresses are created for each Tomcat package. They are added to the Package Control Script in case of legacy packages or the Package ASCII file in case of modular packages. When the Tomcat package is switched over from one node to another, this particular instance is stopped and IP addresses are removed on the primary node, then the IP addresses are reallocated and the instance is started on the adoptive node. Clients will then be automatically connected through these IP addresses to the web site on the adoptive node.

112 Using Tomcat Toolkit in a HP Serviceguard Cluster