I am using Spring 1.2.7, Hibernate 3 and Apache Tomcat
I have created simple user registration page having different fields like email Address, First Name, Last Name, Phone Number, Zip Code etc.
The problem is, one the field (Integer phonenumber) of bean doesn't get set when I hit the submit button of JSP
-- I have checked Spring binding on JSP.
-- I have checked field name (phonenumber) twice.
I am also using one validator class for this registration form. In that class I am trying to print the value of different fields. I get values of all the fields except phonenumber.
Here is some debugging from my side.
1) I have kept SOPs (System.out.Println) in setter method of phonenumber and it gets called when I start the tomcat.
2) Setter method of all the fields get called when I hit the submit button and before going to validator class.
Here is my code excerpt.
2) Buyer.java (Bean)
I forgot to add the error message
on my JSP page.
Failed to convert property value of type [java.lang.String] to required type [java.lang.Integer] for property phonenumber1; nested exception is java.lang.NumberFormatException: For input string
PS : I have asked this question here
I can provide more information if required.
I have spend/waste enough time.