The move is towards to use of forward/include because its a more direct
method than sendRedirect.  sendRedirect has to open a URL connection to
the forward address then return the result to the browser.
RequestDistpatcher however is a direct call on the Server Engine

Gabriel Wong
http://www.ezwebtools.com
-------------------------

Christopher Cobb wrote:
>
> The main difference between sendRedirect() and forward() that I can tell is that 
>forward() will preserve your lifespan=page -level information whereas sendRedirect() 
>will loose it (since a new page is being shown).  Forward preserves this since you 
>use the same request object.
>
> If you are using sessions, I don't think it matters that much.
>
> cc
>
> Nitin Patil wrote:
>
> > Hi Sam,
> >
> > You can use the "res.sendRedirect(URLName)" method, where "res" is the
> > "HttpServletResponse" kindof object. It'll be a good practice to encode the
> > URL first using the "res.encodeUrl(URLName)" method and then pass it to
> > "sendRedirect()".
> >
> > Regards,
> > - Nitin
> >
> > -----Original Message-----
> > From: Weiner, Sam <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> > Date: Wednesday, March 31, 1999 4:08 PM
> > Subject: getRequestDispatcher()
> >
> > >All,
> > >
> > >I'm not able to use the getRequestDispatcher.forward() method. I'm using
> > the
> > >JSDK 2.0 which, as far as I can tell, doesn't include this method.
> > >
> > >The .92 JSP spec says,
> > >
> > >com.sun.server.http.HttpServiceResponse.callPage(String uri,
> > >HttpServletRequest request)
> > >is now:
> > >javax.servlet.ServletContext.getRequestDispatcher(String uripath)
> > >
> > >I'm using GNUJSP, so I would expect to use the former, but I don't seem to
> > >have access to either method.
> > >
> > >Can anyone tell me what I'm doing wrong?
> > >
> > >Thanks,
> > >
> > >Sam Weiner
> > >
> > >===========================================================================
> > >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".

===========================================================================
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".

Reply via email to