UnidataTHREDDS Reference: TDS Installation Options


The next few section describe deploying the TDS under Apache Tomcat. If you are using another web application container, please check whether the section on Java system properties below is relevant to your web application container.

Changing the Configuration Directory Default Location

The default location for the TDS configuration directory (aka the "content" or "content/thredds" directory) is

${TOMCAT_HOME}/content/thredds

This location can be changed by setting the "tds.content.root.path" Java system property. For instance, by adding the following to JAVA_OPTS in your startup script:

-Dtds.content.root.path=/some/absolute/path

The TDS will use or create (if they don't already exist) the configuration files in:

/some/absolute/path/thredds

For more information on the TDS configuration directory, see the "TDS Configuration Directory" page.

Note: If you are running more than one TDS on a single Tomcat instance (see below), please read the section below on Java system properties. Rather than setting the "tds.content.root.path" property with a "-D..." Java option as discussed above, you will need to edit the TDS default properties file:

${TOMCAT_HOME}/webapps/thredds2/WEB-INF/classes/thredds/server/tds.properties

and change the value of "tds.content.path" there.

Running Multiple TDS on one Tomcat Instance

Several extra steps are required to run more than one TDS on a single Tomcat instance. 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:
    • The .war file will be unpacked in the ${TOMCAT_HOME}/webapps/thredds2/ directory.
    • The main URL for that TDS will be: http://server:port/thredds2/catalog.html
  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.


Note on 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 January 2010. Send comments to THREDDS support.