cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carmona Perez, David" <>
Subject RE: Parameter matcher
Date Thu, 24 Apr 2003 09:06:19 GMT
Maybe, I haven't selected the right type of matcher.  Does anyone know how I can branch on
the value of a sitemap variable?


-----Mensaje original-----
De: Carmona Perez, David 
Enviado el: jueves, 24 de abril de 2003 10:17
Asunto: Parameter matcher

Hi all,

I have an action that can set a sitemap parameter whose name is "redirect", and when it is
set the pipeline processing must branch to some other place.

Have this sitemap:

<map:matchers default="wildcard">
        <map:matcher logger="sitemap.matcher.wildcard" name="wildcard"
        <map:matcher logger="sitemap.matcher.regexp" name="regexp"
        <map:matcher logger="sitemap.matcher.regexp" name="parameter"

        <map:act name="myAction">
                <map:match type="parameter" pattern="redirect">
                <map:redirect-to uri="{1}"/>

And the matcher "parameter" always fails because it receives always an empty parameters.

public Map match(String pattern, Map objectModel, Parameters parameters) {

The compiled sitemap, for the matcher call has something like this:

      if ((map = matches("parameter", matcher_N400121_expr, "redirect",
Parameters.EMPTY_PARAMETERS, objectModel)) != null) {
                environment.redirect (false, substitute(listOfMaps, "{1}", environment));

Any help will be greatly appreciated!


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message