tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Price <>
Subject Re: dispatcher.forward(), but with new URL
Date Fri, 10 Jan 2003 20:42:38 GMT

Paul Yunusov wrote:

> sendRedirect() in HttpServletResponse will send an HTTP redirect response to 
> the client so the client's browser itself makes a new request to the new URL 
> (main.jsp in your case). It results in the new URL being shown in the 
> browser's address field.

Paul, this is exactly what I was looking for!  Thank you.  My only fear 
is that if the client User Agent doesn't respect the HTTP Redirect (say 
it is a malicious Perl script or something), does the servlet know not 
to transmit any further data?  Or should I manually call System.exit() 
after the response.sendRedirect() call?

> Note that the original request's parameters, which were sent to the servlet, 
> are lost but check the sendRedirect()'s documentation for more details.

That is okay, I will be storing data in the session in the LoginServlet 
so the original parameters can be dropped.  Thank you very much again.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message