posted 13 years ago
I have a model Person class which holds users input data
RegisterAction class which acts as an Action is
A form page register.jsp which asks for user input
struts.xml is configured as
If I feel out all the user input form fields, everything works fine but if I keep forms "Enter age" field blank, the framework throws exception
WARNING: Error setting expression 'beanPerson.age' with value '[Ljava.lang.String;@b6434f'
ognl.MethodFailedException: Method "setAge" failed for object Register.Model.Person@2ec5b6 [java.lang.NoSuchMethodException: Register.Model.Person.setAge([Ljava.lang.String;)]
Caused by: java.lang.NoSuchMethodException: Register.Model.Person.setAge([Ljava.lang.String;)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1206)
I am not able to figure it out, what is going wrong in this.