Return-Path: Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 26091 invoked from network); 12 Apr 2000 14:42:26 -0000 Received: from mail.gmx.net (HELO mail1.gmx.net) (194.221.183.61) by locus.apache.org with SMTP; 12 Apr 2000 14:42:26 -0000 Received: (qmail 15720 invoked by uid 0); 12 Apr 2000 14:42:19 -0000 Received: from pc19f941c.dip0.t-ipconnect.de (HELO gmx.net) (193.159.148.28) by mail.gmx.net with SMTP; 12 Apr 2000 14:42:19 -0000 Sender: svenk Message-ID: <38F48BD3.93529A3B@gmx.net> Date: Wed, 12 Apr 2000 16:44:36 +0200 From: Sven Kuenzler X-Mailer: Mozilla 4.72 [en] (X11; I; Linux 2.2.14 i686) X-Accept-Language: en MIME-Version: 1.0 To: "cocoon-dev@xml.apache.org" Subject: Cocoon2 and Tomcat Content-Type: multipart/mixed; boundary="------------435FCA50183D11C83250ABAC" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------435FCA50183D11C83250ABAC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, as there were some questions about how to use Cocoon2 with Tomcat, I've written a description of how to do the basic installation. I am quite new to both Tomcat and Cocoon2, so it's probably not the best solution. However, it works ;-) Comments welcome, Sven..... --------------435FCA50183D11C83250ABAC Content-Type: text/html; charset=iso-8859-1; name="installing.xml" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="installing.xml"
Installing Cocoon2

Cocoon requires the following systems to be already installed in your system:

  • Java Virtual Machine A Java 1.1 or greater compatible virtual machine must be present for = both command line and servlet type usage of Cocoon. Note that all servlet = engines require a JVM to run so if you are already using servlets you already= have one installed.
  • Servlet Engine A Servlet 2.x compliant servlet engine must be present in order to s= upport servlet operation and dynamic request handling. Note that this requir= ement is optional for command line operation.

Cocoon is a publishing framework and was designed to be highly modular= to allow users to choose their preferred implementation for the required component and to allow better and faster parallel development.

Previous releases of Cocoon forced you to download all the basic requi= red packages for the installation, but this generated lots of problems for= lack of synch between the projects and the complexity of the operation= =2E For this reason, Cocoon now ships with all the required packages, a sort of a simple distribution to make things easier for you. We apol= ogize for the increased size of the distribution, but we think this will be worthwhile even for users with low bandwidth.

In the /lib directory you'll find all the required packag= es. Now jump to the installation instructions for your servlet engine.

The Ant and Stylebook packages are only used in the build system and are not used by Cocoon at run-time. So you can safely= ignore them in the installation.

Being Cocoon a servlet, you should be able to install it on every comp= liant servlet engine by associating the "org.apache.cocoon.servlet.CocoonSer= vlet" = servlet with the requests you want it to handle. In order to do this, = there = is no standard way, so we try to provide detailed information for the = most = used servlet systems.

First thing to do is to make sure that Cocoon and all the needed comp= onents (as explained in the previous section) are visible. This implies addi= ng this to the servlet engine classpath by adding a bunch of classpath l= ines to your jserv.properties file for each jar package.

wrapper.classpath=3D[path-to-jar]/[jar-name].jar

Here is an example:

wrapper.classpath=3D/usr/local/java/lib/xerces.jar wrapper.classpath=3D/usr/local/java/lib/xalan.jar wrapper.classpath=3D/usr/local/java/lib/fop.jar =2E.. We suggest you do not place the package cocoon= =2Ejar in the classpath but rather follow the instructions in details. = JServ is a Servlet 2.0 compliant servlet engine and will not work if = you place the Servlet_2.2.jar in its classpath. So ignore the servlet_2.2= =2Ejar package that is shipped with Cocoon if you use Jserv.

At this point, you must installe the Cocoon package and set the Cocoo= n = configurations. To do this, you must choose the servlet zone(s) where= you = want Cocoon to reside. If you don't know what a servlet zone is, open= the zone.properties file.

To configure Cocoon, you must pass the cocoon.xconf file location to the cocoon servlet and you do so by adding = the = following lines to the servlet zone properties:

servlet.cocoon.code =3D org.apache.cocoon.servlet.CocoonServlet servlet.cocoon.initArgs=3Dconfigurations=3D[path-to-cocoon]/conf/cocoon.x= conf

That file contains XML configurations for Cocoon in order to do its j= ob and you should not need to change anything to test Cocoon instal= lation at this point.

Now your cocoon servlet is properly configured, but you should tell A= pache to direct any call to a resource you want Cocoon to process it. To do= this add the following lines to your jserv.conf file:

SetHandler cocoon ]]>

Restart Apache (or just Apache JServ if in manual mode), then point y= our browser to the following URI:

http://localhost/cocoon/hello

where Cocoon will greet you.

If this doesn't work, it's a bug in Cocoon2. The above should be the = correct behavior and we should aim to have Cocoon2 work that way. So, if it d= oesn't = work, please help us fixing it. Thank you!
This describes howto install Cocoon2 with a stand-alone Tomcat 3.1b. If you are using Tomcat along with Apache or another web server, you will most probably have to edit the configuration of that server as well. =

First, copy all jar archives from [path-to-Cocoon2]/lib to [path-to-tomcat]/lib. =

As it is not recommended to put cocoon.jar into the class path, we'll set up Cocoon2 into the root context. Unless you changed the Tomcat configuration, the root context is located in [path-to-tomcat]/webapps/ROOT.

Change to the [root-context]/WEB-INF/classes directory and extract Cocoon.jar:

jar xf [path-to-Cocoon2]/build/cocoon.jar

= FIXME: Does anybody know how to get this going without extracting the jar file?

Now, setup Tomcat to use the Cocoon2 servlet. The file [root-context]/WEB-INF/web.xml should look like this:

cocoon org.apache.cocoon.servlet.CocoonServlet = configurations = [path-to-cocoon2]/conf/cocoon.xconf ]]>

Finally, restart Tomcat, point your browser to the following URI...

. http://localhost/servlet/cocoon/hello =

... and say "Hello!" to Cocoon2.

=
--------------435FCA50183D11C83250ABAC--