cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: XSP Redirection HELP!!!
Date Tue, 21 Jan 2003 08:37:28 GMT
On 20.Jan.2003 -- 06:18 PM, Jim McCullough wrote:
> Don't know if this is what you are looking for but you
> can also use the sendRedirect (String url) of the
> HttpResponse object.
> 
> Would look something like this:
> 
> <xsp:logic>
> ((HttpResponse)response).sendRedirect ("http://my_home_page");
> </xsp:logic>
> 
> This is kinda clunky because it sends the response header back
> to the browser but it does the job from within XSP.

There is also a logicsheet for that -- response.xsl.

Please be aware that sending a redirect command to the client *after*
any other data will cause an unpredictable result. This is because the
output is not buffered and thus cannot be cancelled.

It is almost impossible for the redirect to be the first data sent.

So, I would strongly suggest not to do it.

If you *do* want to update the database from an XSP, you have to merge
all possible outcomes into one page. *I* would consider that extremely
bad practice.

HTH

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
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