Difference between setting URL in "Refresh" header and response.sendRedirect() method?
"Karr, David" <[email protected]>
| Newsgroups | gmane.comp.java.sun.servlet |
|---|---|
| Message-ID | <[email protected]> |
I'm changing an existing servlet that redirects to an external URL by setting the "URL" attribute in the "Refresh" header of the response. I would think the Java way to do this would be to use the HttpServletResponse.sendRedirect() method. Is there any effective difference between these two approaches? Does "sendRedirect" do any encoding of the URL, if necessary? This would be an advantage over direct reference to the "Refresh" header. ___________________________________________________________________________ To unsubscribe, send email to [email protected] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html