Greg and I have now deployed Cocoon servlets on Tomcat a number of times, and we've come up with some detailed documentation. This is the state of the art as of today, based on our experience deploying the Cocoon containing the teiJournal application for the IALLT Journal on Tomcat 6.0.14 running on Lettuce.
dFile.encoding="UTF-8"flag on the command line.
URIEncodingparameter of the
<Connector>tag in the
[tomcat]/conf/server.xmlfile, like this:
<Connector port="8081" protocol="HTTP/1.1" URIEncoding="UTF-8" connectionTimeout="20000" redirectPort="8444" />
web.xmlto rename the application from "Cocoon" to "teiJournal". We don't actually know what this DOES, but we think it's probably the right thing to do, and it will prevent there being multiple applications running under the same Tomcat with the same servlet name.
web.xmlto set all encodings to UTF-8 (some are still 8859-1 in the default setup). This assumes that the Tomcat process is itself being launched with a UTF-8 flag in the VM, as part of the Java launch command. Finally, you may want to change the
DEBUG, to get better debug messages from your application.
WARfile to something that works for you. In these instructions, we'll assume you renamed it to ialltjournal.war, which will result in an application that deploys in a directory called ialltjournal.
WARfile in the
webappsdirectory of Tomcat. Restart Tomcat, and check that the application has deployed OK by going into the Tomcat manager application to see it, and also going to
TitleSortComparator.jar(sorts titles ignoring leading articles, etc.)
xqSearchUtils.jar(contains the search-string parsing functionality used for teiJournal's search).
TitleSortComparatorwas written with Eclipse, and will be found in your Eclipse workspace folder;
xqSearchUtilswas written with NetBeans, and will be found in your NetBeans project folder.
<component logger="core.xslt" role="org.apache.excalibur.xml.xslt.XSLTProcessor/saxon" class="org.apache.cocoon.components.xslt.TraxProcessor"> <parameter name="use-store" value="true"/> <parameter name="transformer-factory" value="net.sf.saxon.TransformerFactoryImpl"/> </component>
cocoon/sitemap.xmapto enable the Saxon transformer. In the
<map:transformers>section, add this below the other XSLT transformers:
<map:transformer name="saxon" pool-grow="2" pool-max="32" pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer"> <use-request-parameters>false</use-request-parameters> <use-browser-capabilities-db>false</use-browser-capabilities-db> <xslt-processor-role>saxon</xslt-processor-role> </map:transformer>
<map:serializers>section, to enable a couple more useful output formats:
<!-- 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> <!-- Customization: set text output to UTF-8 --> <map:serializer logger="sitemap.serializer.text" mime-type="text/plain" name="text" src="org.apache.cocoon.serialization.TextSerializer"> <encoding>UTF-8</encoding> </map:serializer>
ialltjournal/WEB-INF) to handle whitespace in mixed content. This part of
conf.xmlneeds to be changed, from:
<indexer caseSensitive="yes" index-depth="5" preserve-whitespace-mixed-content="no" stemming="no" suppress-whitespace="both" tokenizer="org.exist.storage.analysis.SimpleTokenizer" track-term-freq="yes" validation="none">to:
<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">In other words, four changes to attribute values. Then you have to re-upload all the documents in the the db, if there are any still in there.
eXistis running (
eXistclient for the first time (using the
Webstart Client Launchlink on the menu of the page above).
No Pingbacks for this post yet...
This blog is the location for all work involving software and hardware maintenance, updates, installs, etc., both routine and urgent, in the server room, the labs and the R&D rooms.
|<< <||> >>|