I have been running Cocoon 2.1.11 successfully on its own for some time
in Tomcat 5.5.23 under RHEL5 with Apache httpd 2.2.3 but I now need to
add Lucene and some other apps.
The cocoon.war was unwrapped in webapps, and the only installation mods
I made were to add the virtual host block to Apache's httpd.conf
<VirtualHost *:80>
DocumentRoot /var/www/xml
ProxyPreserveHost On
ProxyPass / ajp://localhost:8009/cocoon/
ProxyPassReverse / ajp://localhost:8009/cocoon/
ServerName my.server.name
</VirtualHost>
and modified the sample Host element to match in server.xml
<Host name="my.server.name" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="" docBase="/var/www/xml/"
debug="9" crossContext="true"/>
<Context path="/" docBase="/var/www/xml/"
debug="9" crossContext="true"/>
...
(This may be suboptimal /var/www/xml/ is where my XML/XSLT files are,
but it's unclear to me if this is actually needed at this level of the
config.)
This worked fine to test what I am doing in Cocoon, although the server
sticks in an unwanted /cocoon/ into the URI. Now I need to add Lucene
and several other apps (via .war files) but I am having difficulty
understanding how to configure Tomcat to use multiple apps.
As far as I understand it:
a) I need to make Cocoon the default app, because that's what the bulk
of the work will run through (but I'm happy to be told this is wrong).
Comments in the mailing lists indicate that this will also get rid of
the intrusive /cocoon in the URIs.
b) I then add the other apps in servlet-mappings in web.xml
I deleted the ROOT directory in webapps; renamed the cocoon directory to
ROOT; removed the /cocoon from the httpd.conf; and added this to web.xml
(and restarted tomcat5 and httpd)
<servlet-mapping>
<servlet-name>Cocoon</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
But accessing any URI using the virtual hostname then brought up the
Tomcat 404 error "requested resource (/what/ever) is not available.
I have obviously misunderstood something vital here, but the docs don't
seem to address this particular configuration, and my knowledge of Java
isn't sufficient to dig into the innards of Tomcat.
///Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org