At first,the user enters the values in
the form and then click on submit form. On the server side,form
validation is done.The Eeror
message is displays on the jsp page .
Use the following code to display the error on the jsp page the
<html:errors/> >
tag is used. The <html:errors/>
tag displays all the errors in one go. To
create text box the <html:text .../> nbsp;
e.g.
<html:text
property="address" size="30" maxlength="30"/>
To enter the address,the above tag is used.In form-bean,the address is
retrieved from and later stored in the property
named address. Using <html:submit>Save</html:submit>
tag we ca create the submit button and using <html:cancel>Cancel</html:cancel>
tag we can create Cancel button.
To create a link for testing
the Address.jsp form,add the following line
in index.jsp.
<html:link
page="/pages/Address.jsp">Test Address
Form</html:link>
To test the newly created
screen,build the application
and click on the Test the Address Form
link on the index page .
|