Website Downloads Documentation Knowledgebase Wiki Issue tracker Commercial support

Deploying on Tomcat

The Daisy webapp can be freely moved out of the DAISY_HOME/daisywiki directory and deployed on another servlet container. It has no dependencies on the other stuff from DAISY_HOME, but it does need access to the daisywiki data directory (not the repository data directory). It does not need access to the relational database. See also the diagram in the installation instructions.

Here is how you can deploy Daisy on Tomcat (this was tried both with Tomcat 5.0.28 and Tomcat 5.5.17):

First copy Daisy's webapp (directory DAISY_HOME/daisywiki/webapp) to TOMCAT_HOME/webapps/cocoon (thus the webapp directory gets renamed to cocoon).

Then make sure recent versions of xerces and xalan are in the endorsed library path of Tomcat, you can do this like this (in the Tomcat directory):

$ ls common/endorsed/
xercesImpl.jar  xml-apis.jar
$ rm common/endorsed/*
$ cp webapps/cocoon/WEB-INF/lib/xercesImpl-<version>.jar common/endorsed/
$ cp webapps/cocoon/WEB-INF/lib/xml-apis.jar common/endorsed/
$ cp webapps/cocoon/WEB-INF/lib/xalan-<version>.jar common/endorsed/

To avoid encoding problems, edit the file TOMCAT_HOME/conf/server.xml, search for the element <Connector port="8080" ... and add to it the following two attributes:

URIEncoding="UTF-8" useBodyEncodingForURI="true"

Also, make sure your file encoding is set to UTF-8 (e.g. via the CATALINA_OPTS environment variable):

export CATALINA_OPTS=-Dfile.encoding=UTF-8

To inform the webapp of the location of the wikidata directory, a system property daisywiki.data should be supplied. This can be done as follows:

Windows:
set CATALINA_OPTS=-Ddaisywiki.data=<path to wikidata directory>

Linux:
export CATALINA_OPTS=-Ddaisywiki.data=<path to wikidata directory>

However, this does not work if you want to deploy the Daisy Wiki webapp multiple times inside the same servlet container, using different wikidata directories. In that case, you might either specify the daisyswiki.data parameter inside your WEB-INF/web.xml, or inside the context file CATALINA_HOME/conf/Catalina/your.domain.tld/ROOT.xml. If you prefer to stick to the latter method, which has the advantage that it will survive an update of your daisy installation, your context file should look like:

<?xml version="1.0" encoding="UTF-8"?>
<Context reloadable="true">
  <!-- specify wiki data directoty -->
  <Parameter name="daisywiki.data" value="/path/to/your/daisy/wiki/data" override="false" />
  ...
</Context>

See Specifying the wikidata directory location for more details.

Now start Tomcat, and surf to http://localhost:8080/cocoon/daisy/. That's all there is to it. Note that Daisy requires an expanded webapp, not a war archive.

Comments (1)
Advertisement

Daisy hosting, installation, support. Workshops and turnkey Daisy CMS projects. Get Daisy from its creators.

outerthought.org

Downloads provided by

SourceForge.net Logo

Open source stats