Maintenance

  • Home
  • Log in
  • « More on Tomcat/Cocoon/eXist
  • XEP Cocoon connector build problems »

Tomcat/Cocoon/eXist/XEP/Saxon8 - success

Posted by gregster on 14 Dec 2006 in Servers, Activity log

Tomcat was working quite well as it was, but I still need to work on logging. Ryan is also doing this so I may be a bit lazy here. To be specific, I've edited the following files:

/{tomcat-dir}/conf/tomcat-users.xml (added users and roles for managing the servlet container).

/{tomcat-dir}/webapps/cocoon/sitemap.xmap Changes made:

In the serializers section
<!-- Customization: XEP -->
<map:serializer mime-type="application/pdf" name="fo2pdf"
src="com.renderx.xepx.cocoon.Serializer">
<parameter name="com.renderx.xep.CONFIG" type="string"
value="/complete/filesystem/path/to/xep.xml"/>
</map:serializer>
<map:serializer mime-type="application/postscript" name="fo2ps"
src="com.renderx.xepx.cocoon.Serializer">
<parameter name="com.renderx.xep.CONFIG" type="string"
value="/complete/filesystem/path/to/xep.xml"/>
</map:serializer>

<!-- Customization: MDH: added this serializer to allow for UTF-8 XML output. -->
<map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" name="utf8xml" src="org.apache.cocoon.serialization.XMLSerializer">
<encoding>UTF-8</encoding>
</map:serializer>

<!-- Customization: compatibility setting for IE6 -->
<map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml11_compat" pool-grow="2" pool-max="64" pool-min="2" src="org.apache.cocoon.serialization.XMLSerializer">
<doctype-public>-//W3C//DTD XHTML 1.1//EN</doctype-public>
<doctype-system>http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</doctype-system>
<encoding>UTF-8</encoding>
</map:serializer>

Also commented out the serializers for pdf and postscript that relied on FOP (fo2ps and fo2pdf) because we have xep.

In the mount point section I've added a lookup to {user-homedir}/webapps so we can all have cocoon apps without storing them directly on lettuce/mustard local disk. The mount looks like this:
<map:mount check-reload="yes" src="/home/{1}/webapps/" uri-prefix="~{1}"/>
I'm specifically *not* using home1t because that is an explicit filesystem that might change over time, whereas /home is notional, and is always mapped to whatever filesystem is currently "home".
We may have to implement a hack which is in place on mustard, though. If the above does not work as is, we'll need to add this to the above:
<map:pipeline>
<map:match pattern="cocoon/**">
<map:generate src="cocoon://{1}"/>
<map:serialize type="xml"/>
</map:match>
</map:pipeline>

/{tomcat-dir}/webapps/cocoon/WEB-INF/cocoon.xconf Changes made:
The following adds a saxon8 transformer to the existing saxon6. We've renamed the transformers so that they can be called by name (saxon6 or saxon8).
Saxon8 jar files must be added to Cocoon's lib directory.
<!-- Customization: add saxon8 and rename saxon6-->
<!-- Saxon8 -->
<component logger="core.xslt"
role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon8"
class="org.apache.cocoon.components.xslt.TraxProcessor">
<parameter name="use-store" value="true"/>
<parameter name="transformer-factory" value="com.sf.saxon.TransformerFactoryImpl"/>
</component>
<!-- Saxon6 -->
<component logger="core.xslt"
role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon6"
class="org.apache.cocoon.components.xslt.TraxProcessor">
<parameter name="use-store" value="true"/>
<parameter name="transformer-factory" value="com.icl.saxon.TransformerFactoryImpl"/>
</component>

/{tomcat-dir}/webapps/cocoon/WEB-INF/conf.xml Increased available memory:
<db-connection cacheSize="96M" collectionCacheSize="256" database="native" files="data" free_mem_min="5" pageSize="4096">
Set default permissions:
<default-permissions collection="0764" resource="0764" />
Adjusted watchdog:
<watchdog output-size-limit="-1" query-timeout="60000"/>
Twiddled indexer:
<indexer caseSensitive="no" index-depth="8" preserve-whitespace-mixed-content="yes" stemming="no" suppress-whitespace="none" tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes" validation="none">
Altered the serializer:
<serializer add-exist-id="none" compress-output="no" enable-xinclude="yes" enable-xsl="no" indent="no" match-tagging-attributes="no" match-tagging-elements="yes"/>

Cocoon seems to comply with my direction to pick up webapps in homedirs, so I'll claim success there.

A tutorial for altering cocoon is here, and a more complete tutorial that covers eXist and/or cocoon is here.

This entry was posted by Greg and filed under Servers, Activity log.

Maintenance

This blog is the location for all work involving software and hardware maintenance, updates, installs, etc., both routine and urgent.
  • Home
  • Recently
  • Archives
  • Categories

Search

Categories

  • All
  • Announcements
  • Hit by a bus
  • Labs
    • Activity log
    • Documentation
  • Notes
  • R & D
    • Activity log
    • Documentation
  • Servers
    • Activity log
    • Documentation
  • Tasks

All blogs

  • Academic
  • AdaptiveDB
  • Admin
  • Announcements
  • CanMys
  • Cascade
  • CGWP
  • ColDesp
  • Depts
  • DVPP
  • Endings
  • HCMC Blogs
  • Landscapes
  • LEMDO
  • Linguistics
  • Maint
  • LondonMap
  • Mariage
  • MoM
  • Moses
  • Pro-D
  • Projects
  • ScanCan
  • HumsSites
  • Wendat

This collection ©2025 by admin • Help • Multiblog engine