Chris Wilson wrote:
> <kevin>
> >
> > So the question then is, is it really worth it to use the forward() call
> > over sendRedirect() if at most we will have 1000 to 3000 people a DAY (not
> > hour, not minute) use our site? How much faster is it to use
> > forward() over
> > sendRedirect() as far as each client on our site sees it?
> >
> </kevin>
>
> correct me if i'm wrong, but in addition to incurring a round trip to the
> server, you also cannot pass your request and response objects and whatever
> beans they may hold if you use sendRedirect(). in order to pass on info,
> you'd either have to have it in the session or put in the url. since
> forward() stays at the server, you get all your request data/beans
> transported to the next page for free.
>
Chris is correct ... you also give up request attributes when you switch to
sendRedirect(), because the redirected request comes in separately. IMHO this can
be a big issue, even on intranet sites where the performance differences are not as
large.
One of the interesting suggestions on the "Model 2" threads was having the
configuration information associated with a particular mapping from request URI to
action class also include the URI of the "next" JSP page (or maybe two of them --
one for success and one for failure). That way, you can change the physical names
of your JSP pages without having to modify the action classes themselves, and also
without having to worry about what the referer page was. I'm playing with a
framework concept based on this approach ... look for more info later.
>
> o happy day,
> chris
>
Craig McClanahan
===========================================================================
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