Hi Sam,

1) "sendRedirect()" is going to redirect the client browser to another page,
so there's no option for it. Probably, after we can see JSP 0.92 spec into
effect, we'll be able to use the "getRequestDispatcher()" and its
"forward()" methods. This will solve ur problem.

2) Yes, u can pass a (bean or any) object to the JSP by using the
"session.putValue(nameOfObject, theObject)" where "session" has been created
using the "getSession(true)". Make sure u use the same value for the "NAME"
attribute of the "<BEAN>" tag as specified for the "nameOfObject" parameter
above.

Regards,
- Nitin


-----Original Message-----
From: Weiner, Sam <[EMAIL PROTECTED]>
To: 'Nitin Patil' <[EMAIL PROTECTED]>
Date: Thursday, April 01, 1999 12:46 PM
Subject: RE: getRequestDispatcher()


>Yes, I had that working. Two problems, though:
>1) That entails a round trip to the browser which, incidentally, changed
the
>current URL (a behavoir I didn't want).
>
>2) Can you pass a bean to the JSP page via that method? It doesn't seem so.
>
>Sam
>
> ----------
> From: Nitin Patil[SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, March 31, 1999 7:04 PM
> To: Weiner, Sam
> Cc: JSPs
> Subject: Re:      getRequestDispatcher()
>
> 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".

Reply via email to