Java Reference
In-Depth Information
protected Object formBackingObject(HttpServletRequest req) throws Exception {
PolicyFormBean policyBean = (PolicyFormBean)super.formBackingObject(req);
List productList = (List) req.getSession(false).getServletContext()
return policyBean;
Since I have added a field in the form presented by the JSP, a new field has to be
added to the form bean class. Listing 3-53 shows the modified version of the form bean.
Listing 3-53.
public class PolicyFormBean implements Serializable {
private String firstName;
private String lastName;
private int age;
private List productCodeList;
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