Return to LAS FAQ


Running multiple servlet UIs


Question:



How can I run multiple LAS UI servlets from a single Tomcat installation?

Explanation:

If you have a need, like we do, to run multiple LAS servers on a single computer you will probably want to avoid running a separate Tomcat server with each LAS. Each time you configure another LAS, the LAS configuration process instructs you to start up another Tomcat server to handle the user interface (UI) for that LAS. This can lead to a large number of java processes running as each Tomcat server starts up several daemon processes to listen to the port assigned to it.

For infrequently used LAS interfaces it is better to use only one Tomcat server and have it serve up several different LAS UIs. Just as a single Apache web server handles requests to several different LAS data servers.

A full explanation of the separate UI and data servers is given here.

If you are going to have more than one LAS installation at your site, each installation should be in its own directory. In each directory you will configure a unique LAS. The las/configure.pl script in each directory does the following:

  1. check for the availability of all needed software
  2. add servlet port and web address information to various configuration files
  3. create an las database table
  4. create various directories and scripts from their '.in' files
  5. run las/xml/perl/genLas.pl to populate the las database table with info from the las/server/*.xml files
  6. update the las.war file with las properties and copy it to the las_servlet/jakarta/webapps directory.

It is the las.war file created in step 6. that contains all the information needed by Tomcat to server up that LAS's UI.

Solution:

The configure.pl file in the top level directory for each LAS contains the following:

#
# Home of TOMCAT server (should be configurable in future)
#
my $JAKARTA_HOME = "las_servlet/jakarta";

To have multiple LAS installations share a single Tomcat installation you just need to modify this variable to point to the appropriate location in your Tomcat installation. Then rerun the configure script for that LAS and restart the Tomcat server.


Jonathan Callahan: Jonathan.S.Callahan@noaa.gov
Last modified:February 13, 2003