You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Karich <pe...@yahoo.de> on 2009/03/13 18:48:34 UTC

Matching

Hi,

I thought it is possible to match against a request parameter with the
following code in sitemap.xmap:
<map:matchers default="querystring-matcher">
   <map:matcher name="parameter-matcher"
src="org.apache.cocoon.matching.WildcardRequestParameterMatcher">
       <map:parameter name="parameter-name" value="key1"/>
   </map:matcher>
</map:matchers>
....
<map:pipeline id="test">
   <map:match type="parameter-matcher" pattern="value1">
     <map:act type="myaction">
      ...
     </map:act>
   </map:match>
</map:pipeline>


Why I get "No parameter name given. FAILING" on the request:
http://localhost/path/?key1=value1&otherKeys=otherValues
?

If I use a WildcardURIMatcher with
<map:match pattern="*key1=value1*">
all is fine. But isn't this a performance bottleneck?

Where did I missunderstand the rare documentation ;-) ?
(The docs should include 1 or 2 simple urls for all the Matcher
implementations)

And is there a way to redirect all key1=value1 requests to
http://localhost/path/value1/?otherKeys=otherValues

Regards,
Peter.


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