Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Date conversion problem in form bean  RSS feed

Ashimashi Kabashi
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am facing a little issue when trying to save a date.
The input is coming from a standard <html:text..> field but the getter setter methods in the form bean expect a data type Date.

Now when I run the application it gives me an IllegalArgumentException because it is expecting a java.util.Date and getting a string.

I need to save it to a type java.util.Date because the field in the database is of type Date.

question is// do I typecast the String to date? how and at what point?

Help needed guys!
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!