DTS: DAP2 Test Server


Overview

This document should help you get started configuring the DAP2 Test Server (DTS).

Here you will find:

The DTS is implemented as a Java Servlet and utilizes the Java Servlet API to allow it to act as a "plug-in" to Java Servlet "containers" such as the Tomcat server.

The DTS is primarily used to test the java implementation of the DAP2 protocol. It can also be used to test DAP2 client libraries by having them read from the DTS. This servlet will take any DDS it finds in it's DDScache (see below) and populate it with invented data per client request. This allows the testing of unusual DDS structures.

The DTS was developed, compiled, and tested using the javac 1.4.1 compiler, the 1.4.1 Java Virtual Machine, and Jakarta Tomcat 5.5.20 (which also provided the Java Servlet API (javax.servlet) packages).


Installing the DTS

Optional:

Servlet Configuration

The DTS gets its configuration from the servlet's web.xml file. The default location of the web.xml file is (at least in Tomcat 4.1) in $CATALINA_HOME/webapps/opendap/WEB-INF/web.xml If the servlet context changes then things get renamed accordingly. The servlet context is represented by the basename of the directory $CATALINA_HOME/webapps/opendap, thus by default the servlet context is "opendap"

Servlet classname: opendap.servers.test.dts

<init-param> Elements

Inside the web.xml file, the DTS uses a number of <init-param> elements inside of it's <servlet> element to get specific configuration information.

<init-param>'s common to all OPeNDAP servlets are:

Example of web.xml content:

In this example SequenceLength gets set to 100.

    <!DOCTYPE web-app
            PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
            "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    
        <servlet>

            <servlet-name>dts</servlet-name>
            <servlet-class>opendap.servers.test.dts</servlet-class>
    
            <init-param>
                <param-name>DebugOn</param-name>
                <param-value>showRequest CE CEEvaluator</param-value>
            </init-param>
            <init-param>
                <param-name>SequenceLength</param-name>
                <param-value>100</param-value>
            </init-param>
    
            <load-on-startup>1</load-on-startup>
        </servlet>
    
    
        <servlet-mapping>
            <servlet-name>dts</servlet-name>
            <url-pattern>/dts</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>dts</servlet-name>
            <url-pattern>/dts/*</url-pattern>
        </servlet-mapping>
        <servlet-mapping>
            <servlet-name>dts</servlet-name>
            <url-pattern>*</url-pattern>
        </servlet-mapping>
    
    </web-app>
    

Starting and Stoping the DTS

Start the DTS with this command:
$CATALINA_HOME/bin/startup.sh &

Stop the DTS with this Command:
$CATALINA_HOME/bin/shutdown.sh &



We hope we hope you find this software useful, and we welcome your questions and comments.

To Contact Us:

Technical Support: support@opendap.org