Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date conversion problem in form bean

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!
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic