cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Refondini <patrick.refond...@pobox.com>
Subject Re: Organizing own project in cocoon?
Date Thu, 02 Mar 2006 13:52:22 GMT
Fernando.Matomira@thomson.com wrote:
(...)
> - I don't know how to mount the application into a top-level URI, not
> under 'samples'.

One "host name based" solution I discovered lately while trying to 
redirect several different domains (virtual hosts) to a single Cocoon 
deployment is as follow.

Extract of the top level Cocoon sitemap.xmap


   <!--+
       | Selectors are executed during pipeline setup. They can be used to
       | determine which pipeline fragments should be combined. They are 
best
       | compared with a java switch statement.
       +-->
   <map:selectors default="browser">

     (...)

     <!-- ADDED -->
     <map:selector
         logger="sitemap.selector.host"
         name="host"
         src="org.apache.cocoon.selection.HostSelector">

       <host name="my1st-site" value="www.first.com"/>
       <host name="my1st-site" value="first.com"/>
       <host name="my2nd-site" value="www.second.com"/>
       <host name="my2nd-site" value="second.com"/>

     </map:selector>

     (...)

   </map:selectors>


  <!-- main pipeline -->
   <map:pipeline>

     <!-- ADDED -->
     <map:select
       type="host">
       <map:when test="my1st-site">
           <map:mount uri-prefix="" src="first/sitemap.xmap"/>
       </map:when>
       <map:when test="my2nd-site">
           <map:mount uri-prefix="" src="second/sitemap.xmap"/>
       </map:when>
       <map:otherwise>
           <map:mount uri-prefix="" src="sitemap.xmap"/>
       </map:otherwise>
     </map:select>

     (...)

   <map:pipeline>

Patrick

> 
> 
> Thanks
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message