DYnamic Content Emulator Installation Notes
The DYnamic Content Emulator (DYCE, pronounced like "dice") is implemented as a Java Servlet and is easily deployed as a Web Application Archive (as specified in the Java Servlet API Specification, version 2.2). Our example uses the Tomcat server though you can use any other 2.2 compliant Servlet Engine. We have provided an Ant build file if you want to build the DYCE yourself.
2.0 Deploying the DYCE
2.1 The WAR file
If you are building the DYCE yourself skip to section 4, otherwise copy the WAR file dce.war to the webapps directory (if you are not using Tomcat copy the WAR file to the directory where your server loads war files from). You may need to unzip dce.war if your server does not do so automatically.
2.2 The configuration files
The DYCE uses three configuration files:
You must unzip these DYCE configuration files to a directory named config under the directory in which you start your server since all pathes to DYCE configuration files are relative to this folder. Otherwise the DYCE will not be able to find the config files while loading. The files are kept separate from the DYCE code as you way wish to easily change configuration files, or run multiple instances of the server using different configuration files.
3.0 Starting the DYCE
As mentioned in section 2 you must start the server from the directory which contains the config directory. If you are using Ant to start your server you will need to edit the following paths in the build.properties file (which is located under the directory you unzipped the project):
If you are using Tomcat and have unzipped the project you can type the command
- catalina.home - the directory where your server is installed, e.g. "/usr/local/jakarta-tomcat-4.0"
- deploy.home - the directory where the dce webapp is located, e.g. "/usr/local/jakarta-tomcat-4.0/webapps/dce"
ant start_server from the project root to start the server. If you are using a different server you will need to edit the start_server path to your server's startup script. You will need to restart your server if it was running before you deployed dce.war. You can test to see if the DYCE is running by accessing "http://server_name:server_port/dce/dce?page=file1&summary=true". The command
ant stop_server will stop the server.
4.0 Building the DYCE
An Ant build file (build.xml) is included if you want to build the DYCE yourself. If you have not installed the Ant build tool you can get binary distributions from http://jakarta.apache.org/downloads/binindex.html. Type the command
ant deploy from the root of the project (where you have unzipped the DYCE), this command will both compile the DYCE and copy it to your server's webapps directory.
5.0 The Config Files Explained
This csv file contains on entry per line of the format:
ContentType, SizeLimit, Level, NumObjectsMin, NumObjectsMax, [DistributionType, NumDistributionParameters, DistributionParameter1 .. DistributionParameterN]+
For example, the following line is an entry representative of CNN, with a size limit of 10, using the 6th level of the html parse tree, with an object range of 3 to 4, and two disributions (each with only one parameter). An exponential distribution with a parameter of 1270.00254001, and a paretal distribution with a parameter of 1240.00344003.
This properties file has the following form:
[ContentType].objectSizeLimit = [value]
[ContentType].level = [value]
This file is used to determine which entry in dcg.config is used for content generation so
level should match only one entry in dcg.config.
This file describes the set of files the DYCE will dynamically generate. This properties file associates a filename (which is passed to the DYCE jsp page) with a
ContentTypse. The file is formatted as:
The following indicates that a set of three files will be requested, the first two having
ContentType "cnn" and the remaing "amazon." If a file other than "file1", "file2", or "file3" is requested it will be of type "amazon."