aspose file tools*
The moose likes Struts and the fly likes field-validator type= Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "field-validator type="date" works fine but got ognl.MethodFailedException" Watch "field-validator type="date" works fine but got ognl.MethodFailedException" New topic
Author

field-validator type="date" works fine but got ognl.MethodFailedException

heng zhang
Greenhorn

Joined: Jul 12, 2010
Posts: 16
Hi all
i am using field-validator type="date" to validate the birth date field in my form.
in my action, i declared the birthday variable as



and the getter and setter method



everything seems normal and i do it like the many examples of date validator.

the jsp has the s:textfield of birthday

<s:textfield name="birthday" value="" id="birthday"/>

everything works fine. but i always get the exception:



i know that struts 2 parses birthday as a String, but i created birthday as a Date ,which caused this exception.
but i created birthday as a Date for the purpose of using date validator.

how can i get ride of this exception.

Thanks
Heng


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: field-validator type="date" works fine but got ognl.MethodFailedException