You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Carsten Ziegeler <cz...@s-und-n.de> on 2002/09/26 09:38:45 UTC
RE: SunRise - Accessing Parameter
Hi Richard,
first, could you please send plain text mails and not html.
I assuem that you want to access the resource parameter
in the redirect, right?
So you can use:
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:redirect-to uri="{resource}"/>
</map:act>
With the above used request action, you have access to all request
parameters using their name. So {resource} is replaced with
the value.
HTH
Carsten
-----Original Message-----
From: Richard Reyes [mailto:richard@voxsant.com]
Sent: Thursday, September 26, 2002 10:56 PM
To: C2 Users
Subject: SunRise - Accessing Parameter
Hi Guys,
In
http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunriseComponent
s.html
How can I access the resource parameter in loginpage.xml ( the underlined
part ).
<?xml version="1.0"?>
<content>
<form>
<url>foo-login?resource=foo-protected</url>
<field name="name" type="te
How can I access this parameter in this pipeline? after logging in.
<map:match pattern="foo-login">
<map:act type="sunRise-login">
<map:parameter name="handler" value="foo-handler"/>
<map:parameter name="parameter_name"
value="request:name"/>
<map:parameter name="parameter_password"
value="request:password"/>
<!-- If the authentication is successfull then this
redirect will be performed -->
<map:redirect-to uri="foo-resource-1.html"/>
</map:act>
<!-- authentication failed: -->
<map:generate src="login-failed.xml"/>
<map:transform src="login-failed.xsl"/>
<map:serialize/>
</map:match>
Thanks
Richard
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
RE: SunRise - Accessing Parameter
Posted by Carsten Ziegeler <cz...@s-und-n.de>.
You can simply nest them:
<map:match pattern="foo-login">
<map:act type="sunRise-login">
<map:parameter name="handler" value="foo-handler"/>
<map:parameter name="parameter_name" value="request:name"/>
<map:parameter name="parameter_password"
value="request:password"/>
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:redirect-to uri="{resource}"/>
</map:act>
</map:act>
</map:match>
Carsten
> -----Original Message-----
> From: Richard Reyes [mailto:richard@voxsant.com]
> Sent: Friday, September 27, 2002 12:40 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: SunRise - Accessing Parameter
>
>
> Hi Carsten,
>
> How can I use <map:act type="request"> when I got <map:act
> type="sunRise-login">???
> see....
> <map:match pattern="foo-login">
> <map:act type="sunRise-login">
> <map:parameter name="handler"
> value="foo-handler"/>
> <map:parameter name="parameter_name"
> value="request:name"/>
> <map:parameter name="parameter_password"
> value="request:password"/>
> <!-- If the authentication is successfull then this redirect will be
> performed -->
> <map:redirect-to uri="foo-resource-1.html"/>
> </map:act>
>
> Thanks.
>
> ----- Original Message -----
> From: "Carsten Ziegeler" <cz...@s-und-n.de>
> To: <co...@xml.apache.org>
> Sent: Thursday, September 26, 2002 12:38 AM
> Subject: RE: SunRise - Accessing Parameter
>
>
> > Hi Richard,
> >
> > first, could you please send plain text mails and not html.
> >
> > I assuem that you want to access the resource parameter
> > in the redirect, right?
> > So you can use:
> >
> > <map:act type="request">
> > <map:parameter name="parameters" value="true"/>
> >
> > <map:redirect-to uri="{resource}"/>
> > </map:act>
> >
> > With the above used request action, you have access to all request
> > parameters using their name. So {resource} is replaced with
> > the value.
> >
> > HTH
> > Carsten
> >
> > -----Original Message-----
> > From: Richard Reyes [mailto:richard@voxsant.com]
> > Sent: Thursday, September 26, 2002 10:56 PM
> > To: C2 Users
> > Subject: SunRise - Accessing Parameter
> >
> >
> > Hi Guys,
> >
> > In
> >
> http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunris
eComponent
> s.html
>
> How can I access the resource parameter in loginpage.xml ( the underlined
> part ).
>
> <?xml version="1.0"?>
> <content>
> <form>
> <url>foo-login?resource=foo-protected</url>
> <field name="name" type="te
>
> How can I access this parameter in this pipeline? after logging in.
>
> <map:match pattern="foo-login">
> <map:act type="sunRise-login">
> <map:parameter name="handler" value="foo-handler"/>
> <map:parameter name="parameter_name"
> value="request:name"/>
> <map:parameter name="parameter_password"
> value="request:password"/>
> <!-- If the authentication is successfull then this
> redirect will be performed -->
> <map:redirect-to uri="foo-resource-1.html"/>
> </map:act>
> <!-- authentication failed: -->
> <map:generate src="login-failed.xml"/>
> <map:transform src="login-failed.xsl"/>
> <map:serialize/>
> </map:match>
>
> Thanks
> Richard
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>
Re: SunRise - Accessing Parameter
Posted by Richard Reyes <ri...@voxsant.com>.
Hi Carsten,
How can I use <map:act type="request"> when I got <map:act
type="sunRise-login">???
see....
<map:match pattern="foo-login">
<map:act type="sunRise-login">
<map:parameter name="handler" value="foo-handler"/>
<map:parameter name="parameter_name"
value="request:name"/>
<map:parameter name="parameter_password"
value="request:password"/>
<!-- If the authentication is successfull then this redirect will be
performed -->
<map:redirect-to uri="foo-resource-1.html"/>
</map:act>
Thanks.
----- Original Message -----
From: "Carsten Ziegeler" <cz...@s-und-n.de>
To: <co...@xml.apache.org>
Sent: Thursday, September 26, 2002 12:38 AM
Subject: RE: SunRise - Accessing Parameter
> Hi Richard,
>
> first, could you please send plain text mails and not html.
>
> I assuem that you want to access the resource parameter
> in the redirect, right?
> So you can use:
>
> <map:act type="request">
> <map:parameter name="parameters" value="true"/>
>
> <map:redirect-to uri="{resource}"/>
> </map:act>
>
> With the above used request action, you have access to all request
> parameters using their name. So {resource} is replaced with
> the value.
>
> HTH
> Carsten
>
> -----Original Message-----
> From: Richard Reyes [mailto:richard@voxsant.com]
> Sent: Thursday, September 26, 2002 10:56 PM
> To: C2 Users
> Subject: SunRise - Accessing Parameter
>
>
> Hi Guys,
>
> In
>
http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunriseComponent
> s.html
>
> How can I access the resource parameter in loginpage.xml ( the underlined
> part ).
>
> <?xml version="1.0"?>
> <content>
> <form>
> <url>foo-login?resource=foo-protected</url>
> <field name="name" type="te
>
> How can I access this parameter in this pipeline? after logging in.
>
> <map:match pattern="foo-login">
> <map:act type="sunRise-login">
> <map:parameter name="handler" value="foo-handler"/>
> <map:parameter name="parameter_name"
> value="request:name"/>
> <map:parameter name="parameter_password"
> value="request:password"/>
> <!-- If the authentication is successfull then this
> redirect will be performed -->
> <map:redirect-to uri="foo-resource-1.html"/>
> </map:act>
> <!-- authentication failed: -->
> <map:generate src="login-failed.xml"/>
> <map:transform src="login-failed.xsl"/>
> <map:serialize/>
> </map:match>
>
> Thanks
> Richard
>
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>
>
>
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>