You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mark H <ma...@markhorgan.com> on 2004/04/02 18:08:28 UTC
Problem redirecting in flowscript
I'm having a problem doing redirects in flowscript (using a non-cocoon
protocol). I've traced the problem to the code below and it says redirects
to a new URL are not allowed in the comments. Can anybody tell me why this
is?
org.apache.cocoon.environment.wrapper.EnvironmentWrapper:
/**
* Redirect the client to a new URL is not allowed
*/
public void redirect(boolean sessionmode, String newURL)
throws IOException {
this.redirectURL = newURL;
// check if session mode shall be activated
if (sessionmode) {
// get session from request, or create new session
request.getSession(true);
}
}
Mark H
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem redirecting in flowscript
Posted by Upayavira <uv...@upaya.co.uk>.
I know Mark H found a solution in using a global redirect. What a global
redirect is, I'm not entirely sure, but it worked!
Regards, Upayavira
Mark Lundquist wrote:
>
> On Apr 13, 2004, at 11:33 AM, Joel McConaughy wrote:
>
>> Apache commons library does not support cross-host redirects. <..snip..>
>
>
> How come <map:redirect-to> does not suffer from this? It'll redirect
> you to anywhere!
> — mark
>
>> From: Mark Lundquist [mailto:ml@wrinkledog.com]
>>
>> Any word on this? I never saw a reply, but I too am interested in the
>> answer... any takers?
>> Thanks,
>> Mark L :-)
>>
>> On Apr 2, 2004, at 8:08 AM, Mark H wrote:
>>
>>> I'm having a problem doing redirects in flowscript (using a non-cocoon
>>>
>>> protocol). I've traced the problem to the code below and it says
>>> redirects to a new URL are not allowed in the comments. Can anybody
>>> tell me why this
>>> is?
>>>
>>> org.apache.cocoon.environment.wrapper.EnvironmentWrapper:
>>>
>>> /**
>>> * Redirect the client to a new URL is not allowed
>>> */
>>> public void redirect(boolean sessionmode, String newURL)
>>> throws IOException {
>>> this.redirectURL = newURL;
>>>
>>> // check if session mode shall be activated
>>> if (sessionmode) {
>>> // get session from request, or create new session
>>> request.getSession(true);
>>> }
>>> }
>>>
>>> Mark H
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: Problem redirecting in flowscript
Posted by Joel McConaughy <jo...@displayware.com>.
I bet it uses the http-client library instead.
Joel McConaughy
Managing Partner
Displayware
800 Fifth Ave., #101-316
Seattle, WA 98104-3191
206-300-4732 Direct
206-382-2188 Fax
joel@displayware.com
-----Original Message-----
From: Mark Lundquist [mailto:ml@wrinkledog.com]
Sent: Saturday, April 17, 2004 6:18 PM
To: users@cocoon.apache.org
Subject: Re: Problem redirecting in flowscript
On Apr 13, 2004, at 11:33 AM, Joel McConaughy wrote:
> Apache commons library does not support cross-host redirects.
> <..snip..>
How come <map:redirect-to> does not suffer from this? It'll redirect
you to anywhere!
- mark
> From: Mark Lundquist [mailto:ml@wrinkledog.com]
>
> Any word on this? I never saw a reply, but I too am interested in the
> answer... any takers? Thanks,
> Mark L :-)
>
> On Apr 2, 2004, at 8:08 AM, Mark H wrote:
>
>> I'm having a problem doing redirects in flowscript (using a
>> non-cocoon
>>
>> protocol). I've traced the problem to the code below and it says
>> redirects to a new URL are not allowed in the comments. Can anybody
>> tell me why this is?
>>
>> org.apache.cocoon.environment.wrapper.EnvironmentWrapper:
>>
>> /**
>> * Redirect the client to a new URL is not allowed
>> */
>> public void redirect(boolean sessionmode, String newURL)
>> throws IOException {
>> this.redirectURL = newURL;
>>
>> // check if session mode shall be activated
>> if (sessionmode) {
>> // get session from request, or create new session
>> request.getSession(true);
>> }
>> }
>>
>> Mark H
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem redirecting in flowscript
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Apr 13, 2004, at 11:33 AM, Joel McConaughy wrote:
> Apache commons library does not support cross-host redirects.
> <..snip..>
How come <map:redirect-to> does not suffer from this? It'll redirect
you to anywhere!
— mark
> From: Mark Lundquist [mailto:ml@wrinkledog.com]
>
> Any word on this? I never saw a reply, but I too am interested in the
> answer... any takers?
> Thanks,
> Mark L :-)
>
> On Apr 2, 2004, at 8:08 AM, Mark H wrote:
>
>> I'm having a problem doing redirects in flowscript (using a non-cocoon
>>
>> protocol). I've traced the problem to the code below and it says
>> redirects to a new URL are not allowed in the comments. Can anybody
>> tell me why this
>> is?
>>
>> org.apache.cocoon.environment.wrapper.EnvironmentWrapper:
>>
>> /**
>> * Redirect the client to a new URL is not allowed
>> */
>> public void redirect(boolean sessionmode, String newURL)
>> throws IOException {
>> this.redirectURL = newURL;
>>
>> // check if session mode shall be activated
>> if (sessionmode) {
>> // get session from request, or create new session
>> request.getSession(true);
>> }
>> }
>>
>> Mark H
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> 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
RE: Problem redirecting in flowscript
Posted by Joel McConaughy <jo...@displayware.com>.
Apache commons library does not support cross-host redirects. Solution
is to
use the httpClient library in an XSP to manually process the redirects
and then read the response and serialize into the stream.
Joel McConaughy
Managing Partner
Displayware
800 Fifth Ave., #101-316
Seattle, WA 98104-3191
206-300-4732 Direct
206-382-2188 Fax
joel@displayware.com
-----Original Message-----
From: Mark Lundquist [mailto:ml@wrinkledog.com]
Sent: Tuesday, April 13, 2004 10:45 AM
To: users@cocoon.apache.org
Subject: Re: Problem redirecting in flowscript
Any word on this? I never saw a reply, but I too am interested in the
answer... any takers?
Thanks,
Mark L :-)
On Apr 2, 2004, at 8:08 AM, Mark H wrote:
> I'm having a problem doing redirects in flowscript (using a non-cocoon
> protocol). I've traced the problem to the code below and it says
> redirects to a new URL are not allowed in the comments. Can anybody
> tell me why this
> is?
>
> org.apache.cocoon.environment.wrapper.EnvironmentWrapper:
>
> /**
> * Redirect the client to a new URL is not allowed
> */
> public void redirect(boolean sessionmode, String newURL)
> throws IOException {
> this.redirectURL = newURL;
>
> // check if session mode shall be activated
> if (sessionmode) {
> // get session from request, or create new session
> request.getSession(true);
> }
> }
>
> Mark H
>
>
>
> ---------------------------------------------------------------------
> 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
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem redirecting in flowscript
Posted by Mark Lundquist <ml...@wrinkledog.com>.
Any word on this? I never saw a reply, but I too am interested in the
answer... any takers?
Thanks,
Mark L :-)
On Apr 2, 2004, at 8:08 AM, Mark H wrote:
> I'm having a problem doing redirects in flowscript (using a non-cocoon
> protocol). I've traced the problem to the code below and it says
> redirects
> to a new URL are not allowed in the comments. Can anybody tell me why
> this
> is?
>
> org.apache.cocoon.environment.wrapper.EnvironmentWrapper:
>
> /**
> * Redirect the client to a new URL is not allowed
> */
> public void redirect(boolean sessionmode, String newURL)
> throws IOException {
> this.redirectURL = newURL;
>
> // check if session mode shall be activated
> if (sessionmode) {
> // get session from request, or create new session
> request.getSession(true);
> }
> }
>
> Mark H
>
>
>
> ---------------------------------------------------------------------
> 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