cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jorg Heymans ...@domek.be>
Subject Re: Exclude String from RegexpHostMatcher
Date Tue, 18 May 2004 12:49:51 GMT
Did you switch the map:match to use regexp instead of wildcard?

<map:matchers default="wildcard">
  <map:matcher name="wildcard" 
factory="org.apache.cocoon.matching.WildcardURIMatcher"/>
  <map:matcher name="regexp" 
factory="org.apache.cocoon.matching.RegexpURIMatcher"/>
</map:matchers>

so <map:match type="regexp" > should work.


I've never actually used this but this is how i would expect it to work. 
If it still fails then you should test your regexp first outside of 
cocoon in a POJO


Volkm@r wrote:

> How can I exclude a certain character string from a match?
> I am using the RegexpHostMatcher for redirecting virtual hosts to their 
> own directories. No problem so far.
> 
> Now, in order to keep Cocoon's samples and docs in $Cocoon-Home, I want 
> to exclude "cocoon" from this match.
> 
> I searched for a suitable expression [1] and tried the following
> 
> ================================
> <map:match pattern="(.*(?!cocoon)):(.*)" type="regexphost">
>   <map:mount check-reload="yes" src="/srv/www/{1}/" uri-prefix=""/>
> </map:match>
> ================================
> 
> But I am only getting this error message:
> 
>   org.apache.avalon.framework.component.ComponentException:
>   Invalid pattern '(.*(?!cocoon)):(.*)' for matcher at line ...
> 
> That's what I don't understand. How can I fix it?
> 
> Thanks for your attention
> 
> [1] <http://www.zvon.org/other/PerlTutorial/Output/example23.html>


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


Mime
View raw message