cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <ajuf...@sun3.oulu.fi>
Subject Re: C1 to C2
Date Fri, 13 Jul 2001 12:27:49 GMT
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: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>

-- 
Andre H. Juffer              | Phone: +358-8-553 1683
The Biocenter and            | Fax: +358-8-553-1141
    the Dep. of Biochemistry | Email: Andre.Juffer@oulu.fi
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message