cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robby.pelss...@vodafone.com
Subject RE: HttpResponse.sendRedirect vs. ResponseWrapper (solved)
Date Wed, 01 Dec 2004 10:23:18 GMT
I looked into mailing list:

This did the trick !!
<xsp:include>javax.servlet.http.HttpServletResponse</xsp:include>

HttpServletResponse httpResponse =        
(HttpServletResponse)this.objectModel.get(HttpEnvironment.HTTP_RESPONSE_OBJE
CT);

-----Original Message-----
From: robby.pelssers@vodafone.com [mailto:robby.pelssers@vodafone.com]
Sent: 01 December, 2004 10:57
To: users@cocoon.apache.org
Subject: 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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message