tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vladi <vladi_ro...@yahoo.com.br>
Subject Redirect page from http11processor
Date Sat, 09 Feb 2008 03:57:26 GMT

Hi developers.

I want to redirect the client browser from the Http11Processor. To do that,
I create a "class CustomProcessor extends Http11Processor" and override the
process(socket) method.

I did try with methods above with IE or Mozilla but unsuccessfully. Instead
of that, The page cannot be displayed is shown.

response.setStatus(307);
response.setHeader("Location", "http://www.somepage.com"); 
outputBuffer.sendHeader("Location", "http://www.somepage.com");

I did try too with 

Response response = (Response)
request.getResponse().getNote(CoyoteAdapter.ADAPTER_NOTES);
response.sendRedirect("http://www.somepage.com");

but again, unsuccessfully. I saw that the
setNote(CoyoteAdapter.ADAPTER_NOTES) is perform after the process, because
is called in CoyoteAdapter.service(..) method.

The code sendRedirect works in a valve, but not in a processor nor protocol
classes.

Any Ideas to redirect to some page? Somebody do that in other way?
Thanks

Regards.
-- 
View this message in context: http://www.nabble.com/Redirect-page-from-http11processor-tp15368353p15368353.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message