> -----Original Message-----
> From: apurva zaveri [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, September 05, 2002 6:12 PM
> To: [EMAIL PROTECTED]
> Subject: Redirect from sub-sitemap in authentication framework
> 
> 
> Redirect from an sub-sitemap to the login page does
> not seem to be working in authentication framework.
> 
> i.e
> 
> If you have a protected page in subsitemap.
> The redirection in sub-sitemap (in case of not
> authenticated) is not able to go to login page (in
> sitemap)
> 
>       <map:match pattern="protected">
>               <map:act type="auth-protect">
>                       <map:parameter name="handler" value="AuthHandler"/>
> 
>                 <map:generate
> src="docs/protected.xml"/>
>                 <map:transform
> src="stylesheets/simple-page2html.xsl"/>
>                 <map:transform type="encodeURL"/>
>                 <map:serialize/>
>             </map:act>
>             <!-- something was wrong, redirect to
> login page -->
>             <map:redirect-to uri="../login"/>   <!--
> this does not work even cocoon:/login does not work 
> -->
>       </map:match>
> 
This map:redirect-to is never executed - if the auth-protect
action notices that the user is not logged in, it automatically
redirects to the login-in configuration of your handler.

HTH
Carsten

> It look for login in the current sitemap.
> But i fixed this problem this way:
> 
>       <map:match pattern="login">
>              <map:redirect-to uri="../login"/>
>       </map:match>
> 
>       <map:match pattern="protected">
>               <map:act type="auth-protect">
>                       <map:parameter name="handler" value="AuthHandler"/>
> 
>                 <map:generate
> src="docs/protected.xml"/>
>                 <map:transform
> src="stylesheets/simple-page2html.xsl"/>
>                 <map:transform type="encodeURL"/>
>                 <map:serialize/>
>             </map:act>
>             <!-- something was wrong, redirect to
> login page -->
>             <map:redirect-to uri="login"/>
>       </map:match>
> 
> Obvioulsy this is not a right way......... is it a bug
> or am i going wrong somewhere?
> 
> -Apurva
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Finance - Get real-time stock quotes
> http://finance.yahoo.com
> 
> ---------------------------------------------------------------------
> 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:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 

---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to