Dynamator Pure HTML for every page generation technology.

Dynamator Installation


Dynamator requires the following software:


  1. If you are using a JDK version earlier than JDK 1.4, download Xerces and add the xerces jar files to the classpath. (Depending on the version of Xerces, this will be either xerces.jar or xml-apis.jar and xercesImpl.jar.)
  2. If you will be using Dynamator on HTML files, download JTidy and add Tidy.jar to the classpath.
  3. Unzip the Dynamator distribution. It will create a directory named dynamator-r.v, where r is the release number and v is the version number. This directory contains the following directories and files:
    File Description
    LICENSE The Dynamator license.
    Readme.html Information about the current release.
    doc/ Documentation. See doc/index.html.
    dynamator.jar The Dynamator JAR file.
    examples/ Dynamator examples.
    src.zip Dynamator source code.
  4. Add the dynamator.jar file to the classpath. The location of dynamator.jar is .../dynamator-r.v/dynamator.jar.

Verifying the Installation

This procedure describes how to verify JSP generation. It can be used as a model for other target languages.

The distribution includes an "examples" directory that contains some example files, a makefile, and an Ant build script.

  1. CD to directory 'examples/jsp'.
  2. Copy the 'generated' subdirectory to a different directory (say, 'generated-original').
  3. If you have ant:
    1. Run "ant clean".
    2. Run "ant".
  4. If you don't have ant, but you have make:
    1. Run "make clean_dos" or "make clean_unix", depending on your OS.
    2. Run "make all".
  5. Otherwise, run 'java dynamate ../x.html' for some file x.dyn in the directory.
  6. Compare the generated JSP file(s) in the 'generated' subdirectory with the generated JSP files in the original directory. The only thing that should be different is the generation timestamp. If you have GNU diff, you can do this with a single command:
    diff -I "<%-- generated by *" generated-original generated

Source code

Source code is delivered as a zip file within the Dynamator file distribution. Unzipping the src.zip file will add the following files relative to the Dynamator root directory (i.e. .../dynamator-r.v/):

File Description
doc-src/ Documentation source directory.
languages/ Source code directory for language extensions.
Regression tests are under languages/dynamator/language-name/test/regression.
src/ Main source code directory.
tools/ Source code directory for tools delivered with Dynamator. Currently the only tool is the Dynamator ant task.
build.xml Main ant build script.
doc.xml Ant script to build Dynamator documentation.
jcoverage.xml Ant script for coverage testing using jcoverage. See file for requirements.
pmd.xml Ant script for linting source code using PMD. See file for requirements.
test.xml Ant script for regression testing.
test-invalid.xml Ant script for regression testing (invoked by test.xml).
test-syntax.xml Ant script for regression testing (invoked by test.xml).
testall.bat Batch file for comprehensive testing.


In addition to the runtime requirements listed above, building Dynamator requires a Java compilation environment supporting the following:

  • Ant 1.5.3-1.
  • To build documentation and run regression tests, ant-contrib 0.5. To build under JDK 1.1 or JDK 1.2, ant-contrib must be recompiled under JDK 1.2 (the binary distribution was compiled using the modern compiler, which is incompatible).
  • To build documentation and run regression tests under a JDK version earlier than 1.4, jakarta-oro 2.0.8. Under JDK 1.1, jakarta-oro must be patched to replace JDK 1.2 API calls with JDK 1.1 API calls.

Ant-contrib and Jakarta-oro jars are expected to reside in ${ANT_HOME}/lib. Versions identified above are the versions used to build Dynamator. The build has not been tested with other versions.

Libraries required to build Dynamator for distribution (except for Ant) are provided as a separate download. The Dynamator distribution is JDK 1.1 and jview compatible, and is compiled under JDK 1.2.2.

To execute build commands, cd to .../dynamator-r.v. The following commands are available:

Command Description
ant Compiles Dynamator classes and builds jar. Files are placed in directory 'build'.
ant clean Deletes compiled class files. Attempts to delete jar file.
ant doc Builds Dynamator documentation. Generated documentation is placed in directory 'build/doc'.
ant test Runs Dynamator regression tests.

To run under jview, Dynamator must be built using the JDK 1.2 compiler.

To run regression tests under jview, enter the command jview /d:ant_home=%ANT_HOME% org.apache.tools.ant.Main -f test.xml. Not all tests will be performed.