This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

heng zhang
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.


Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic