cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Refondini <>
Subject Re: Two domain within cocoon
Date Wed, 12 Apr 2006 18:14:59 GMT
Sergio del Amo Caballero wrote:
> Hi,
> I am running Cocoon as a tomcat web application.  I am using Apache as a 
> front end to all requests that come to my server. Then i configured the 
> apache mod_jk2 module to forward certain URLs to Tomcat. Particulary to 
> cocoon (webapps/cocoon). I have two website developed under cocoon.
> One of them is under webapps/cocoon/site1 and the other one under 
> webapps/cocoon/site2.
> Both domains names point to cocoon root directory (i tried pointing them 
> to the subdirectory but it does not recognises them as a webapp).
> So, i have:
> => webapps/cocoon
> => webapps/cocoon
> I thought i could configure cocoon matchers to match directly urls but 
> it does not work. I tried:
> <map:match pattern="">
>      <map:generate src="domain1/content/index.xml"/>
>      <map:transform src="domain1/style/xsl/presentation.xsl" />
>      <map:serialize type="xhtml"/>
> </map:match>
> <map:match pattern="">
>      <map:generate src="domain2/content/index.xml"/>
>      <map:transform src="domain2/style/xsl/presentation.xsl" />
>      <map:serialize type="xhtml"/>
> </map:match>
> Can anyone point what should i do, two manage two domains names within 
> cocoon?
> thanks in advanced for the help,
> Sergio

Hi Sergio,

an alternative you may try to avoid running several Cocoon instance:

     <!-- CUSTOMISED -->
     <map:selector logger="" name="host" 
       <host name="domain1-site" value=""/>
       <host name="domain1-site" value=""/>
       <host name="domain2-site" value=""/>
       <host name="domain2-site" value=""/>


       <map:when test="domain1-site">
           <map:mount uri-prefix="" src="domain1/sitemap.xmap"/>
       <map:when test="domain2-site">
           <map:mount uri-prefix="" src="domain2/sitemap.xmap"/>
           <map:mount uri-prefix="" src="sitemap.xmap"/>



Then in each domain1/sitemap.xmap ,domain2/sitemap.xmap you may define:

<map:match pattern="">
       <map:generate src="content/index.xml"/>
       <map:transform src="style/xsl/presentation.xsl" />
       <map:serialize type="xhtml"/>

being customised after their own context.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message