cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geoff Howard <ghow...@crosswalk.com>
Subject RE: Configure to support virtual directories
Date Wed, 14 Aug 2002 21:17:47 GMT
well, it may get at cocoon, if you mean for one cocoon instance to be
serving both sites.  In this case, you really need to rephrase the question
to have www.abc.com point to {COCOON_WEBAPP_DIR}/abc_cocoon and www.xyz.com
point to {COCOON_WEBAPP_DIR}/xyz_cocoon where these are sub-sitemaps.

After you have abc.com and xyz.com coming to cocoon, you'll have two options
described at 
http://xml.apache.org/cocoon/faq/faq-configure-environment.html
either have cocoon setup as the ROOT webapp, or use apache mod_rewrite or
something like it.

after that, you'd most likely use the
org.apache.cocoon.matching.WildcardHostMatcher to do something like 

<map:match type="host" pattern="www.*.com">
	<map:mount check-reload="yes" src="{1}/" uri-prefix="{1}"/>
<map:match>

then, you'd have 
xyz/sitemap.xmap and
abc/sitemap.xmap

to handle each site individually.

If you, on the other hand need to share many uri's between the sites (as the
project I've been working on) 
then you'd need to nest some matchers.  For instance, if
www.abc.com/article.html?id=3 needs to be the same as 
www.xyz.com/article.html?id=3 but with a different page wrapper, you'd use
the host to determine which xsl to 
apply instead of sending them off to a different sitemap.  

In this case, you'll want to look into sitemap variables (input modules,
etc) if you start getting into complex 
nesting and matching or are unable to reuse your pipeline logic enough.

Is that getting close to what you were looking for?

Geoff Howard

> -----Original Message-----
> From: Antonio Gallardo Rivera 
> [mailto:agallardo@agsoftware.dnsalias.com]
> Sent: Tuesday, August 13, 2002 11:02 PM
> To: cocoon-users@xml.apache.org
> Subject: Re: Configure to support virtual directories
> 
> 
> Hey, this is not a Cocoon thing. This is a question about the 
> use of Tomcat or 
> what ever JSPcontainer you use.
> 
> Antonio Gallardo
> 
> 
> El Martes, 13 de Agosto de 2002 20:10, Greg Jones escribió:
> > Does anyone what is required to have Cocoon work as the default
> > directory for a multiple site environment?
> >
> > Example would be www.abc.com docBase points to ../webapps/abc_cocoon
> > And
> > www.xyz.com docBase points to ../webapps/xyz_cocoon
> >
> > Will this work? Can there be two instances of cocoon 
> working like this?
> >
> >
> >
> > Thanks in advance --
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.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