Tomcat question about Cocoon

2001-03-16 Thread Martin Mauri



Hi users:

How can I configure Cocoon to work with 
Tomcat-Apache configuration? I mean, in which .conf file do I have to place the 
Cocoon reference?

thanks in advance.

Lic. Martin O. MauriProfesion + Auge 
A.F.J.PParana 666 - Cap. Federal[EMAIL PROTECTED]www.profesi.com.ar


Re: Tomcat question about Cocoon

2001-03-16 Thread Arnaud Vandyck

 Martin Mauri wrote:
 
 Hi users:
 
 How can I configure Cocoon to work with Tomcat-Apache configuration? I
 mean, in which .conf file do I have to place the Cocoon reference?

make a webapps/cocoon directory, then a webapps/cocoon/WEB-INF and then
modify your webapps/cocoon/WEB-INF/web.xml file. You also have to put
webapps/cocoon/WEB-INF/cocoon.properties file from
$COCOON/conf/cocoon.properties.

Well, according to cocoon/docs/install.html#tomcat :

To make Cocoon work with Tomcat, you must add a context to Tomcat that
describes to Tomcat how to load Cocoon files. Then you must tell Apache
to send certain requests to Tomcat (and consequently Cocoon). Finally
you must provide the .xml files to be served by Cocoon.

...

Next you must tell Tomcat about the new context which will run Cocoon
requests. To do this edit the file
$TOMCAT_HOME/conf/server.xml and add the following line: 

Context path="/cocoon" docBase="webapps/cocoon" debug="0"
reloadable="true" 
/Context

This tells Tomcat that requests that come in under that partial path
"/cocoon" should be mapped to the context defined in the directory
"webapps/cocoon". We will set that up shortly. 

Next, if using Apache with Tomcat [...] we need to tell Apache to
forward the same partial pathnames to Tomcat. This is done by editing
the tomcat.conf file (it's called tomcat-apache.conf if you're using
Tomcat 3.1, but with Tomcat 3.2 you have a choice between tomcat-apache
and the more advanced mod_jk.conf-auto) and associating it with your
Apache setup, as described below.

Very Important Note! Both of these files are now regenerated and
overwritten whenever you run Tomcat, so don't edit them directly, but
instead save them as something else! 

[...]

First make a directory and its subdirectory: 

 mkdir $TOMCAT_HOME/webapps/cocoon
 mkdir $TOMCAT_HOME/webapps/cocoon/WEB-INF

Next copy the template files from the Cocoon distribution: 

 cp $COCOON_HOME/src/WEB-INF/web.xml $TOMCAT_HOME/webapps/cocoon/WEB-INF
 cp $COCOON_HOME/conf/cocoon.properties
$TOMCAT_HOME/webapps/cocoon/WEB-INF

Next you need to edit the $TOMCAT_HOME/webapps/cocoon/WEB-INF/web.xml
file to point to the Cocoon properties file in the same directory. Do
this by changing the text conf/cocoon.properties to
WEB-INF/cocoon.properties. Note that this path is a relative path, and
must be so. Don't try to use an absolute path here. It won't work. Also
note that the web.xml file describes how to map .xml requests to the
Cocoon servlet. 

[...]

-- 
Arnaud Vandyck http://www.ressource-toi.org/