Bruce Bantos wrote:
> I have written an application that passes a simple data bean to a JSP page
> for presentation. This page then passes name/value pairs back to a servlet
> for database updates. I would like to have the JSP page simply update the
> properties of the data bean using the SETFROMREQUEST tags in the JSP page,
> and then pass this bean back to the servlet for database updates.
>
> I am sending the bean to the JSP page with the following code, and it works
> just fine:
>
> TestBean tb = new TestBean();
> Req.setAttribute("tb", tb);
>
> RequestDispatcher rd =
> getServletContext().getRequestDispatcher("/presentation.jsp");
> rd.include(Req, Res);
>
> MY QUESTION:
>
> After updating the data bean tb in the JSP page, how do I pass it back to
> the Servlet?
>
> Thanks for the help!
>
> Bruce
You could try passing information as a session value (which the JSP page grabs
with lifespan="session") instead of a request attribute. The session will
survive the current request, so any changes made in the JSP page will be
visible to your servlet on the next request.
Craig McClanahan
===========================================================================
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".