You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Bas Passon <BP...@parite.nl> on 2000/11/20 15:28:29 UTC

problems with response.sendRedirect

Hello,

i'm having a problem with the sendRedirect for the
HttpServletResponse object. When I am processing a xsp page and have to
redirect, i get all data it processed already and the data of the page I
redirected to.

In de servlet-api-docs i found something like

	response.reset();

which should clear the buffer of state and data, but i still
get the buffered data.

How can I solve this?

Thnx

Bas Passon

Re: problems with response.sendRedirect

Posted by Matthew Cordes <mc...@maine.edu>.
I've had the sdame problem, but only with IE.  I solved it 
by instead of using 

	response.sendRedirect( location );

	I used...
	
	response.setStatus( 301 );
	response.setHeader( "Location", location );
	response.flushBuffer();

response.sendRedirect creates a very simple webpage
for the client to see just in case the redirect does 
not work, I assume that is causing the problem.  

-matt



On Mon, Nov 20, 2000 at 03:28:29PM +0100, Bas Passon wrote:
> Hello,
> 
> i'm having a problem with the sendRedirect for the
> HttpServletResponse object. When I am processing a xsp page and have to
> redirect, i get all data it processed already and the data of the page I
> redirected to.
> 
> In de servlet-api-docs i found something like
> 
> 	response.reset();
> 
> which should clear the buffer of state and data, but i still
> get the buffered data.
> 
> How can I solve this?
> 
> Thnx
> 
> Bas Passon