# Cocoon and Jigsaw
Installing cocoon on Jigsaw

Jigsaw Home / Documentation Overview / Tutorials

This Page
Download
CLASSPATH
Servlet.properties
Xml mapping
Documentation

Jigsaw Links
JigAdmin
Servlet Tutorial
JSP Configuration
Indexers

W3C Links
XML
XSL

Cocoon Links
Cocoon Site
Download Cocoon
User Guide

# 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).

  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