Running Multiple TDS in a Single Tomcat Installation


Deploying multiple TDS instances in a single Tomcat container is NOT recommended.

Note: A better solution may be to run two Tomcat instances each running a TDS and then run a proxy server in front of both TDS instances (see our "Running Tomcat Behind a Proxy Server" documentation for more information on proxy configuration).


Though we have tried to fix reported problems with a setup that involves multiple TDS in a single Tomcat instance, we do not ourselves run any servers in this configuration nor do we thoroughly test this setup.

The main issue:

If You Must ...

If you need to run multiple TDS in a single Tomcat instance, there are several extra steps required Two of the steps are the same for all version of the TDS:

  1. Change the context path ("/thredds") of the TDS. This can be done by changing the name of the thredds.war file. For instance (we'll use this example throught this section), changing it to thredds2.war will result in the following:
  2. In ${tomcat_home}/webapps/thredds2/WEB-INF/web.xml, change the value of the "ContextPath" context parameter from "thredds" to "thredds2".

The remaining steps depend on the TDS version.

For TDS 4.1.2 and above:

  1. In ${tomcat_home}/webapps/thredds2/WEB-INF/classes/thredds/server/tds.properties, change the value of "tds.content.path" from "thredds" to "thredds2".

For TDS 4.0 through 4.1.1:

  1. In ${tomcat_home}/webapps/thredds2/WEB-INF/web.xml, add the following:
    <context-param>
      <param-name>log4jExposeWebAppRoot</param-name>
      <param-value>false</param-value>
    </context-param>
        
  2. In ${tomcat_home}/webapps/thredds2/WEB-INF/classes/thredds/server/tds.properties, change the value of "tds.content.path" from "thredds" to "thredds2".

For TDS 3.17:

No extra steps are required for TDS 3.17.


Web Application Containers and Java System Properties

Some web application containers (like Tomcat) have a single set of Java system properties that are shared by all webapps deployed in a single container instance. Other web application containers (like Resin) keep separate sets of Java system properties for each webapp deployed in a single container instance.

If you are using a web application container that keeps Java system properties separate for each webapp deployed, the steps in the above sections that require editing the TDS default properties file ("tds.properties") may instead be handled by setting the values of the Java system properties. The details of how Java system properties are set will depend on the particulars of the web application container you are using.


THREDDS This document is maintained by Unidata and was last updated November 2010. Send comments to THREDDS support.