Deploying Cocoon 2 in JBoss

Author:Tom Coleman <[email protected]>

Introduction

Apache Cocoon is a next-generation XML publishing framework. According to the developers, Cocoon 2 is currently "beta quality".

Cocoon 2 is very easily deployed using JBoss 2.4 configured to use Embedded Tomcat 3.2.2. The specific release used was JBoss 2.4 BETA Rel_2_4_0_23.

The deployment was on a RH Linux 6.2 system using the Sun 1.3 jdk.

Outstanding Deployment Issues

SQL examples. This documentation does not address getting the SQL examples to work. If you have successfully deployed the Cocoon 2 SQL examples using JBoss, please post your experiences to the jboss-user mailing list.

Cocoon 2 and JBoss-Jetty. If you have successfully deployed Cocoon 2 using JBoss-Jetty, please post your experiences to the jboss-user mailing list.

X Server required. One of the advanced features of Cocoon 2 is support of Scalable Vector Graphics. On Unix platforms, this feature requires access to an X server. If your system does not run an X server and you have problems with the "sitemap", search the Cocoon Mailing List Archives for Xvfb.

Contributors:

  • David Rothman

  • Jan Heise

  • Tom Coleman

Installation & Configuration

  1. Download Cocoon 2

    You can get the source from The Apache Project's XML Download Page. We used the "Cocoon-2.0b2" package.

  2. Build the Cocoon 2 WAR package

    Follow the instructions in the Cocoon installation instructions to build the Apache Cocoon 2 WAR package. The resulting .war file will be deployed in the $JBOSS_HOME/deploy directory.

  3. Modify JBoss and Tomcat JARS and Classpath

    The Cocoon installation instructions have a section on installing on JBoss 2.2.2 with Tomcat 3.2.2. These instructions work for JBoss 2.4.x. Remove the unneeded JAR files from the JBoss and Tomcat /lib directories. If you are using JBoss 2.4.x, ignore the reference to xml.jar.

    Add xerces_1_4_1.jar to $JBOSS_CLASSPATH and comment out the JAXP references in $JBOSS_HOME/bin/run.sh.

  4. Start JBoss

    Start JBoss and copy the cocoon.war to the deploy directory. You should see JBoss deploy Cocoon.

  5. Run Cocoon

    Point your browser to http://your-server-name.your-domain:8080/cocoon to start Cocoon.