Taggart,
Could you please elaborate. I am having a hard time understanding the
drawback here...
Gabriel Wong
http://www.ezwebtools.com
-------------------------
Taggart Gorman wrote:
>
> > -----Original Message-----
> > From: A mailing list about Java Server Pages specification
> > and reference
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Craig R. McClanahan
> > Sent: Wednesday, March 24, 1999 5:36 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: getting access to HttpServletResponse
> >
> [...]
>
> > The "forwarding" is done by using the
> > ResourceDispatcher.forward() method (in
> > the 0.92 reference implementation). When released under the
> > 2.1 servlet API,
> > this call will become RequestDispatcher.forward() instead,
> > but it accomplishs
> > the same purpose. It acts a little like a redirect, except
> > there is no extra
> > round trip to the browser and thus no performance impact.
>
> The drawback I've found with the forward() method is that since there is no
> real redirect happening (but saving us the extra round trip) is that the url
> displayed for the forwarded page is really the URL of the initial page that
> was called.
>
> This can backfire on you and your users in the following situation:
>
> Your login page has a form with ACTION="/servlet/LoginServlet". When the
> user submits the form, the user's browser goes to the page
> "/servlet/LoginServlet". The servlet does it's work, and forwards to some
> other page, let's say your main menu page, but the user still sees the url
> of "/servlet/LoginServlet". So if they were to bookmark this new page,
> they'd really be bookmarking the servlet.
> So then you'd need to write code in the servlet to handle this possibility
> and blah, blah, blah. I've taken to avoiding servlets and forward() all
> together to avoid this.
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JSP-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".