Paul Yunusov wrote:
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?
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.
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.
Erik
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
