You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ro...@vodafone.com on 2004/12/01 10:57:02 UTC

RE: HttpResponse.sendRedirect vs. ResponseWrapper

Hi Ralph,

following code didn't work:
HttpResponse httpResponse =
(HttpResponse)ObjectModelHelper.getResponse(objectModel);

I get a java.lang.ClassCastException, because
ObjectModelHelper.getResponse(objectModel) returns a
org.apache.cocoon.environment.wrapper.ResponseWrapper

What should i do to resolve this ?


-----Original Message-----
From: Ralph Goers [mailto:Ralph.Goers@dslextreme.com]
Sent: 30 November, 2004 17:09
To: users@cocoon.apache.org
Subject: Re: HttpResponse.sendRedirect vs. ResponseWrapper


The first thought that comes to mind is to get the HttpResponse object out
of the ObjectModel.

Ralph


robby.pelssers@vodafone.com said:
> Hi all,
>
> We used HttpResponse.sendRedirect to divert to other pages in some cases.
> Like for instance :
>  HttpResponse httpResponse = (HttpResponse)response;
>  httpResponse.sendRedirect(WebApp.rewriteURI("id:helpinaccessnetwork"));
> But with Cocoon2.1.6, it seems that the response is of type
> org.apache.cocoon.environment.wrapper.ResponseWrapper.
> Is there another way of redirecting??
>
> Kind regards,
> Robby Pelssers
>
>
> ---------------------------------------------------------------------
> 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