Hmm. My guess is that you'd have to have matching patterns in the apache
configuration,
which isn't always possible and kinda sucks.

- Anders


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Andre
Juffer
Sent: 13. heinakuuta 2001 15:28
To: [EMAIL PROTECTED]
Subject: Re: C1 to C2


Anders Lindh wrote:
>
> >Be aware that C2 will serve _all_ the pages (including the static
> >ones). If you are in an Apache+Tomcat+Cocoon context, this mean that
> >Everything on your site will be served by C2.
>
> If you use apache you tell it what requests to pass to Tomcat (with mod_jk
> or mod_jserv). You can e.g tell it to pass requests for all .xml files in
> /cocoon to Tomcat (and cocoon if configured properly). This way all static
> content can be served by apache (x100 faster) and all dynamic pages by
> tomcat/cocoon.


Yes, this is correct. This is the way I have done in the past
(apache-tomcat-cocoon1). But is this going to work only if one uses the
extension .xml., since Cocoon2 also uses patterns in its sitemap (e.g.
"welcome" instead of "welcome.xml")?



For tomcat-apache-cocoon1, the following is what I have in httpd.conf:

LoadModule jserv_module libexec/mod_jserv.so
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel notice

ApJServDefaultHost localhost
ApJServDefaultPort 8007

ApJServMount default /root

AddType test/jsp .jsp
AddHandler jserv-servlet .jsp
AddType text/xml .xml
AddHandler jserv-servlet .xml

Alias /cocoon /usr/local/jakarta-tomcat-3.2.1/webapps/cocoon

<Directory "/usr/local/jakarta-tomcat-3.2.1/webapps/cocoon">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /cocoon /cocoon
AddType text/xml .xml
AddHandler jserv-servlet .xml
<Location /cocoon/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

Alias /Foo /usr/local/jakarta-tomcat-3.2.1/webapps/Foo
<Directory "/usr/local/jakarta-tomcat-3.2.1/webapps/Foo">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /Foo/servlet /Foo
<Location /Foo/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>



The server.xml in tomcat/conf in fact includes an entry for cocoon1 as
follows:

<!-- Start Cocoon Section -->

    <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>
          cocoon.properties
        </param-value>
      </init-param>
    </servlet>


    <servlet-mapping>
      <servlet-name>org.apache.cocoon.Cocoon</servlet-name>
      <url-pattern>*.xml</url-pattern>
    </servlet-mapping>

<!-- End Cocoon Section -->>



Everything that has the extension .xml including those in /Foo
automatically is forwarded to cocoon1 and therefore served by cocoon1,
while the static files are served by the Apache webserver. This all
works very nicely.

It must be possible to do the same thing with cocoon2 somehow, but it
seems to me that these "patterns" could cause some problems.

Andre.



> - Anders
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>

--
Andre H. Juffer              | Phone: +358-8-553 1683
The Biocenter and            | Fax: +358-8-553-1141
    the Dep. of Biochemistry | Email: [EMAIL PROTECTED]
University of Oulu, Finland  | WWW:
http://www.biochem.oulu.fi/research.html

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to