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.URIEncoding parameter of the <Connector> tag in the [tomcat]/conf/server.xml file, like this:
<Connector port="8081" protocol="HTTP/1.1"
URIEncoding="UTF-8"
connectionTimeout="20000"
redirectPort="8444" />
web.xml to 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.xml to 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 log-level parameter from WARN to DEBUG, to get better debug messages from your application.WAR file 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.WAR file in the webapps directory 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 :[port#]/ialltjournal/.ialltjournal/WEB-INF/lib:
TitleSortComparator.jar (sorts titles ignoring leading articles, etc.)xqSearchUtils.jar (contains the search-string parsing functionality used for teiJournal's search).TitleSortComparator was written with Eclipse, and will be found in your Eclipse workspace folder; xqSearchUtils was written with NetBeans, and will be found in your NetBeans project folder.
.jar libraries into cocoon/WEB-INF/lib. <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.xmap to 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>
conf.xml file (in ialltjournal/WEB-INF) to handle whitespace in mixed content. This part of conf.xml needs 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.
:[port#]/ialltjournal/).eXist is running (:[port#]/ialltjournal/samples/blocks/exist/).
eXist client for the first time (using the Webstart Client Launch link 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.
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|---|---|---|---|---|---|
| << < | > >> | |||||
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | ||||||