W3C logo
Jigsaw

Cocoon and Jigsaw
Installing cocoon on Jigsaw


Jigsaw Home / Documentation Overview / Tutorials

Installing cocoon on Jigsaw

Download Cocoon
Jigsaw has been tested with Cocoon 1.8.

Cocoon is a servlet, so we only have to install it and configure Jigsaw to "associate" all xml documents to that servlet.

Update your CLASSPATH variable:
CLASSPATH=$CLASSPATH:\
          [cocoon-home]/lib/xerces.jar:\
          [cocoon-home]/lib/stylebook.jar:\
          [cocoon-home]/lib/fop.jar:\
          [cocoon-home]/bin/cocoon.jar:\
          [cocoon-home]/lib/xalan.jar:\
          [cocoon-home]/lib/turbine-pool.jar
Edit servlet.properties
In [jigsaw-home]/Jigsaw/Jigsaw/config/servlet.properties Add the lines:
#COCOON
servlet.cocoon.code=org.apache.cocoon.Cocoon
servlet.cocoon.description=The Cocoon Servlet
servlet.cocoon.initArgs=properties=[cocoon-home]/conf/cocoon.properties
servlet.cocoon.icon=burst.gif
Configure xml mapping
Ok, it's time to restart Jigsaw with the new configuration. Now we need to "map" all xml documents to the Cocoon servlet, for that we use a ServletMapperFrame exactly like we do for jsp configuration.

So, setup the indexer with JigAdmin (eg: cocoon-indexer). Under the "extensions" node add the "xml" extension using a FileResource associated to a ServletMapperFrame. Then, in the ServletMapperFrame, set the "servlet-url" field to the Cocoon Servlet URI (eg: /servlet/cocoon).

XML Mapping configuration

Note: don't forget to associate the cocoon-indexer to the top level directory resource of your cocoon space.

Read the documentation!
Cocoon User Guide