Processing HTML Forms by JavaBeans
If using a Bean to process the form data, no action tag is necessary on the form.
Give form element names that correspond to properties in the bean (exactly, respecting upper and lower case).
First give the useBean tag to instantiate the Bean.
Then give the setProperty tag either to set all properties, if all form elements names are included in the bean’s properties, or to set individual ones. <jsp:useBean id="numguess" class="num.NumberGuessBean" scope="session"/> <jsp:setProperty name="numguess" property="*"/>
Similarly, you can retrieve data from a bean property and use it in the resulting html page:<H1> Hello <jsp:getProperty name=“mybean” property=“username”/>! </H1>