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".
begin:vcard
n:Cobb;Christopher
tel;cell:703-909-7550
tel;fax:703-648-7475
tel;work:703-648-6725
x-mozilla-html:TRUE
org:Powerhouse Technologies, Inc.
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
title:SW Architect
fn:Christopher Cobb
end:vcard

Reply via email to