cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Merico Raffaele <raffaele.mer...@less.ch>
Subject AW: redirect-to problem
Date Fri, 06 Oct 2006 06:42:47 GMT
Thanks Luca, 

but I really need a client-side redirect to the relative URI /auth/logout.
Does it help if I would use a Flow script to do the redirect!

<map:call function="redirectToUri">
   <map:parameter name="uri" value="/auth/logout"/>
</map:call>

function redirectToUri ()
{
	var debug = false;
	
	if (debug) {
		java.lang.System.out.println("\n--- enter redirectToUri()
---");
	}
	
	var uri = cocoon.parameters.uri;
	if (debug) { java.lang.System.out.println("uri[" + uri + "]"); }
	return cocoon.redirectTo(uri, true);
}

Raffaele

> -----Urspr√ľngliche Nachricht-----
> Von: Luca Morandini [mailto:lmorandini@ieee.org]
> Gesendet: Freitag, 6. Oktober 2006 08:35
> An: users@cocoon.apache.org
> Betreff: Re: redirect-to problem
> 
> Merico Raffaele wrote:
> > Dear Community
> >
> > I have a system running with Cocoon 2.1.7.
> >
> > In the sitemap under
> >    webapps/V2D/appl I do a
> >    <map:redirect-to uri="/auth/logout"/>.
> >
> > Now it seems that this redirect is expanded with the IP address of the
> > server (i.e. http://999.999.999.999/auth/logout). But since this Cocoon
> > application is protected by a web entry system, this request cannot be
> > resolved.
> >
> > The question is now, how can I avoid the usage of the IP address in the
> > map:redirect-to.
> 
> You are doing a client-side redirect, hence Cocoon prefixes the URI with
> the server's address.
> If the page you want the user redirected to is in the Cocoon app, you
> can prefix the "cocoon:" protocol and have a server-side redirect, like
> in:
> 
> <map:match pattern="folder/page1.html">
>      <map:redirect-to uri="cocoon:/folder/page2.html"/>
> </map:match>
> 
> Regards,
> 
> --------------------
>     Luca Morandini
> www.lucamorandini.it
> --------------------
> 
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message