sendRedirect causes a round-trip to the browser and back, and round-trips
are evil.

You'll nearly always prefer forwards (or includes) over re-directs.

Kevin Jones
DevelopMentor
www.develop.com

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Kevin Duffey
> Sent: 10 March 2000 07:03
> To: [EMAIL PROTECTED]
> Subject: sendRedirect or forward?
>
>
> Hi,
>
> I am curious, using JSP and all..is it better to FORWARD to
> another page, or
> use the response.sendRedirect(). I notice a strange side effect
> in using the
> forward in that the URL of the browser no longer reflects the
> page returned
> when using forward. Doesn't seem to be a big deal to me, and I now its
> faster to return a page, then round-robin to the browser and back
> again. Is
> there any way to maybe update the URL of the browser to show the new page?
> Or is this the norm when forwarding? I was curious how Model 2 JSP
> developers handle this situation, as they probably forward to a
> page rather
> than redirect.
>
> Am I correct in that forwarding is a performance enhancement because it
> saves the client from hitting the server twice? Also, could this be the
> reason Netscape sends TWO forms (submits) often, rather than
> one..or is that
> a Netscape bug others have seen? Odd that When people submit a form with
> MSIE, its fine, but Netscape seems to submit the form twice.
>
> Thanks.
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to