Installing the DITA Open Toolkit Server

The DITA Open Toolkit Server is a Java application that needs installing independently from Componize for Alfresco.

The DITA Open Toolkit Server lets you run and retreive results from the DITA OpenToolkit using REST APIs. It is packaged and provided as a JAR file that can be setup in many ways. This guide describes a simple folder structure to use it in a Windows environment.

Note: The DITA Open Toolkit Server needs to be installed on the same server as Alfresco
Note: The DITA Open Toolkit Server is compiled using Java 1.8 so you will need at least a comparable JDK to run it.
  1. Create a folder called dita-ot.
  2. In the dita-ot folder, download and unzip a DITA Open Toolkit distribution (https://www.dita-ot.org/download).
    For example, that will create a sub-directory called dita-ot-3.5.4.
  3. In the dita-ot folder, create a new subfolder server.
  4. In the dita-ot/server folder, create a new subfolder lib.
  5. In the dita-ot/server/lib folder, download the latest Componize DITA Open Toolkit Server JAR (https://download.componize.com/releases/dita-ot-server).
  6. In the dita-ot/server folder, create a new file called application.properties with the following contents:
    # Location of your DITA Open Toolkit installation folder
    dita-ot.dir=file:/C:/path/to/my/dita-ot/dita-ot-3.5.4
                            
    # Temporary folder used to store temporary files during DITA Open Toolkit processing
    dita-ot.jobs-dir=file:/C:/path/to/my/dita-ot/jobs
                            
    # Network port that the DITA Open Toolkit Server will listen on
    server.port=8090
    Note: The jobs folder is not cleaned automatically but can be deleted at any time (when the DITA Open Toolkit Server is not running)
  7. In the dita-ot/server folder create a new file called run.bat with the following content:
    @echo off
    rem -------
    rem Script to run Componize DITA Open Toolkit Server
    rem -------
    
    :start
    echo Starting DITA Open Toolkit server
    echo Press control-c to stop this script . . .
    "%JAVA_HOME%\bin\java" -jar "lib/componize-dita-ot-server-1.1.0.jar -Xmx1024m -Xms256m"
    echo .
    pause
    You should have a folder structure that now looks like the following:
    dita-ot/dita-ot-3.5.4/
    dita-ot/server/application.properties
    dita-ot/server/run.bat
    dita-ot/server/lib/componize-dita-ot-server-1.1.0.jar
  8. In your Alfresco installation, update the properties located in tomcat/shared/classes/alfresco-global.properties to add the DITA Open Toolkit Server url:
    dita-ot.server.url = http://localhost:8090
    Note: The port used has to match the server.port from the application.properties file.
  9. Run the bat file to startup the server.
    A new window opens with the traces of the DITA Open Toolkit Server
You can now perform DITA OT processing from your Alfresco Share interface.