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 [EMAIL PROTECTED] - verba volant, scripta manent - (discussions get forgotten, just code remains) --------------------------------------------------------------------- -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. --------------------------------------------------------------------- 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: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>