Java Reference
In-Depth Information
<body onLoad="displayError(<%=request.getAttribute("ERROR_MESSAGE")%>)">
<form name="policy" method="POST">
First Name <input type="text" name="firstName" value="" /><br/>
Last Name <input type="text" name="lastName" value="" /><br/>
Age <input type="text" name="age" value="" /><br/>
<input type="button" value="Save" onClick="eventSubmit('')"/>
With Spring MVC, the form bean does not have any life-cycle dependency on
the framework, except creation. Also, the form beans do not need to implement any
framework-specific interface. Hence, these objects can be safely used in other parts
of the application—business tier and integration tier.
Listing 3-21.
public class PolicyFormBean implements Serializable {
private String firstName;
private String lastName;
private int age;
public int getAge() {
return age;
public void setAge(int age) {
this.age = age;
public String getFirstName() {
return firstName;
public void setFirstName(String firstName) {
this.firstName = firstName;
Search WWH ::

Custom Search