I'll recommend three ways.
The first is to use the struts framework and let this be handled for you.
The second is to use a servlet to handle the form submission. The servlet
can store the bean as a request attribute, and dispatch to the jsp. The jsp
can then retrieve the bean using the <jsp:useBean...> tag. It can retrieve
with scriptlets as well but, thats bad form.
If you just want something quick and dirty have the post submit to a jsp
page. The jsp page can use a jsp:useBean tag and a jsp:setProperty tag to
populate the bean.
see this here: http://www.jsptut.com/Forms.jsp
To counter that tutorial page, I'll recommend that you use JSTL tags instead
of the scriptlets for the output.
> Does anybody have any advice on how to store form data in a bean when
> the user clicks the submit button, then retrieve the data and display it
[quoted text clipped - 3 lines]
>
> Amy
Dirk Michaelsen - 28 Jun 2004 07:13 GMT
Hi Paul,
>I'll recommend three ways.
here is the fourth quick and dirty way:
Use sesssion.setAttribute(...) and session.getAttribute(...) to pass
data between two JSPs or servlets. It's the easiest way and you don't
need any bean.
cu
Dirk
Amy Johnson - 10 Jul 2004 00:49 GMT
Thanks for the help. I'll set it up and try it.
Amy
> I'll recommend three ways.
> The first is to use the struts framework and let this be handled for you.
[quoted text clipped - 18 lines]
>>
>>Amy