You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ulf Sahlin <ul...@s2communications.se> on 2004/07/29 23:09:40 UTC
Authentication and matchers
Hi!
I'm having some trouble with authentication and pattern matchers. Is there
some reason as to why this works:
<map:match pattern="customer/*">
<map:act type="auth-protect">
<map:parameter name="handler" value="customerhandler"/>
<map:match pattern="customer/overview.*">
<map:call resource="generate-customer-overview"/>
<map:call resource="transform-customer-overview-{1}">
<map:parameter name="locale" value="{../locale}"/>
</map:call>
<map:call resource="serialize-{1}"/>
</map:match>
</map:act>
</map:match>
.. but this does not:
<map:match pattern="customer/overview.*">
<map:act type="auth-protect">
<map:parameter name="handler" value="customerhandler"/>
<map:call resource="generate-customer-overview"/>
<map:call resource="transform-customer-overview-{1}">
<map:parameter name="locale" value="{../locale}"/>
</map:call>
<map:call resource="serialize-{1}"/>
</map:act>
</map:match>
In the lower non-working version I'm getting errors about Cocoon not finding
the resource "transform-customer-overview-" (please note the trailing dash).
This would mean, the pattern "*" matcher value is lost? Normally, {1} would
translate into "html" or whatever carrier I'm using.
Best regards,
Ulf Sahlin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Authentication and matchers
Posted by Jan Hoskens <jh...@schaubroeck.be>.
Try {../1} with the second one (don't know if your locale parameter
needs this too, where does it come from? Needs to be {../../locale} if
it comes from the same level as the "1")
This "../" is needed whenever you have an extra level in your pipeline.
The action is such a level so use "../".to go up one level and get the
parameter.
Kind Regards,
Jan
Ulf Sahlin wrote:
>Hi!
>
>I'm having some trouble with authentication and pattern matchers. Is there
>some reason as to why this works:
>
><map:match pattern="customer/*">
> <map:act type="auth-protect">
> <map:parameter name="handler" value="customerhandler"/>
>
> <map:match pattern="customer/overview.*">
> <map:call resource="generate-customer-overview"/>
>
> <map:call resource="transform-customer-overview-{1}">
> <map:parameter name="locale" value="{../locale}"/>
> </map:call>
>
> <map:call resource="serialize-{1}"/>
> </map:match>
> </map:act>
></map:match>
>
>
>.. but this does not:
>
>
><map:match pattern="customer/overview.*">
> <map:act type="auth-protect">
> <map:parameter name="handler" value="customerhandler"/>
> <map:call resource="generate-customer-overview"/>
> <map:call resource="transform-customer-overview-{1}">
> <map:parameter name="locale" value="{../locale}"/>
> </map:call>
> <map:call resource="serialize-{1}"/>
> </map:act>
></map:match>
>
>
>In the lower non-working version I'm getting errors about Cocoon not finding
>the resource "transform-customer-overview-" (please note the trailing dash).
>This would mean, the pattern "*" matcher value is lost? Normally, {1} would
>translate into "html" or whatever carrier I'm using.
>
>
>Best regards,
> Ulf Sahlin
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org