Win a copy of Real-World Software Development: A Project-Driven Guide to Fundamentals in Java this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

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

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.


Whip out those weird instruments of science and probe away! I think it's a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!