You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by FREDERICK E WAYNE <fe...@facstaff.wisc.edu> on 2003/07/01 18:08:26 UTC

question: adapting matchers to environment

hullo all,

we're running a cocoon site in multiple places. each of the developers has their own local tomcat/cocoon install, plus we have the production server.

trouble is, the production server has a slightly different environment. URIs have to be a little different:

development: http://localhost:8080/ems/emslinks/foo
production: http://server/cocoon/ems/emslinks/foo

the sitemap has to reflect this, so:

development:
<map:match pattern="emslinks/*">
 <map:generate type="html" src="emslinks/{1}.html"/>
 <map:serialize/>
</map:match>

production:
<map:match pattern="ems/emslinks/*">
 <map:generate type="html" src="emslinks/{1}.html"/>
 <map:serialize/>
</map:match>
   
so i have to maintain two sitemap files, which is incredibly error-prone. my question is this: is there some way i can parameterize the matching from, say, an environment variable? say:
<map:match pattern="{$fnord}/emslinks/*">

or am i completely barking up the wrong tree, and should apply my efforts to making the URIs the same for the development machines?

thanks for the help,

rw


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


Re: question: adapting matchers to environment

Posted by Joerg Heinicke <jo...@gmx.de>.
Hello Frederick,

maybe a bit late, but ...

I see two possibilities:

1. Switch in a root sitemap on the production system using the following
mount:

<map:match pattern="ems/**">
    <map:mount src="ems/" uri-prefix="ems"/>
</map:match>

2. Configure Tomcat or whatever container you use to take cocoon/ems/ as
servlet context instead of cocoon/. From what I see ems/ is the context
on the development systems too.

Regards,

Joerg

FREDERICK E WAYNE wrote:

> hullo all,
> 
> we're running a cocoon site in multiple places. each of the developers has their own local tomcat/cocoon install, plus we have the production server.
> 
> trouble is, the production server has a slightly different environment. URIs have to be a little different:
> 
> development: http://localhost:8080/ems/emslinks/foo
> production: http://server/cocoon/ems/emslinks/foo
> 
> the sitemap has to reflect this, so:
> 
> development:
> <map:match pattern="emslinks/*">
>  <map:generate type="html" src="emslinks/{1}.html"/>
>  <map:serialize/>
> </map:match>
> 
> production:
> <map:match pattern="ems/emslinks/*">
>  <map:generate type="html" src="emslinks/{1}.html"/>
>  <map:serialize/>
> </map:match>
>    
> so i have to maintain two sitemap files, which is incredibly error-prone. my question is this: is there some way i can parameterize the matching from, say, an environment variable? say:
> <map:match pattern="{$fnord}/emslinks/*">
> 
> or am i completely barking up the wrong tree, and should apply my efforts to making the URIs the same for the development machines?
> 
> thanks for the help,
> 
> rw


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