cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Litrik De Roy" <cocoon-us...@litrik.com>
Subject Re: XSP Redirect in Cocoon 2
Date Thu, 05 Sep 2002 17:56:20 GMT
I have documented how to write an action using XSP at
http://outerthought.net/wiki/Wiki.jsp?page=XSPAction

That should get you started.

Litrik De Roy
www.litrik.com


----- Original Message -----
From: "Michael Edge" <michael.edge@db.com>
To: <cocoon-users@xml.apache.org>
Sent: Thursday, September 05, 2002 5:28 PM
Subject: Re: XSP Redirect in Cocoon 2


>
> Thanks for the suggestion Nicola. Could you point me in the direction of
an example on how to do this? I've spent hours searching for information on
redirects, and as with most Cocoon documentation, it's pretty vague.
>
> Thanks
>
> Michael
>
>
> Michael Edge wrote:
> > Hi All
> >
> > It seems to me that the following code will not work in Cocoon 2.
>  > I believe it works in Cocoon 1, but for some reason the request
>  > and response objects available within XSP for Cocoon 2 are not
>  > HttpServletRequest and HttpServletResponse objects, but rather
>  > some cocoon equivalents, org.apache.cocoon.environment.Response
>  > and org.apache.cocoon.environment.Request. Unfortunately these
>  > new classes do not include the sendRedirect method. Any ideas
>  > how I would do this? I need to construct a URL in my code
>  > and redirect to that URL.
> >
> >   <xsp:logic>
> >     String url = URLEncoder.encode(url + whatever + parameters);
> >     response.sendRedirect(url);
> >   </xsp:logic>
> >
> > Thanks
>
> Don't use XSPs for flow control, use the sitemap.
>
> Add an Action that does this and redirect. You can write Actions using
> XSPs BTW.
>
> Better still, use the action to return the url and then do a <redirect>
> in the sitemap; it makes your action more reusable.
>
> --
> Nicola Ken Barozzi                   nicolaken@apache.org



---------------------------------------------------------------------
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:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message