Hello Rick,
    though both achieve the same thing,using
RequestDispatcher one can pass objects to the next
JSP using setAttribute and Get Attribute methods.

--- Rick L Sample <[EMAIL PROTECTED]> wrote:
> What is the difference between using:
>
> ...
>     if (session == null) {
>
>
res.sendRedirect("http://localhost:8080/error.html");
>     }
> ...
>
> as opposed to:
>
> ...
>       String url="/jsp/shopping/EShop.jsp";
>       ServletContext sc = getServletContext();
>       RequestDispatcher rd =
> sc.getRequestDispatcher(url);
>       rd.forward(req, res);
> ...
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED]
> and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives:
>
http://archives.java.sun.com/archives/servlet-interest.html
> Resources:
>
http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to