You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ChenJP <ch...@email.com> on 2000/09/29 05:07:49 UTC
Re: AddHandler for XML files
About direct XML to Tomcat , just same as your direct JSP file to Tomcat.
In another words, do it in 2 step2:
1.Configure Apache to direct XML to Tomcat
Following is a section of my conf : $APACHE_HOME/conf/tomcat-apache.conf
#########################################
# Tomcat Configuration
#########################################
LoadModule jserv_module libexec/mod_jserv.so
<IfModule mod_jserv.c>
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel notice
ApJServDefaultPort 8007
AddType test/jsp .jsp
AddHandler jserv-servlet .jsp
#Added by ChenJP 2000/07/31 for Cocoon
AddType text/xml .xml
AddHandler jserv-servlet .xml
Alias /examples /usr/local/Tomcat3.1/webapps/examples
<Directory "/usr/local/Tomcat3.1/webapps/examples">
Options Indexes FollowSymLinks
</Directory>
ApJServMount /examples/servlet /examples
<Location /examples/WEB-INF/ >
AllowOverride None
deny from all
</Location>
ApJServMount /servlet /ROOT
</IfModule>
2.Configure Tomcat/Cocoon
modify your $TOMCAT_HOME/webapps/yourapp/WEB-INF/web.xml,
define Cocoon servlet and mapping *.xml to Cocoon servlet
<servlet>
<servlet-name>org.apache.cocoon.Cocoon</servlet-name>
<servlet-class>org.apache.cocoon.Cocoon</servlet-class>
<init-param>
<param-name>properties</param-name>
<param-value>WEB-INF/cocoon.properties</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>org.apache.cocoon.Cocoon</servlet-name>
<url-pattern>*.xml</url-pattern>
</servlet-mapping>
Wish this is solve your problem.
----- Original Message -----
From: "Clint Morgan" <cl...@nebulex.net>
To: <co...@xml.apache.org>
Sent: Friday, September 29, 2000 12:41 PM
Subject: AddHandler for XML files
> Hey, guys, I know this question must have come up before, but I can't find
> any good information on this. So if it's redundant, please forgive me ahead
> of time...
>
> Is there anyway to direct all XML files to Tomcat/Cocoon from Apache?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>