GABOREAU Véronique wrote:

> Hi,
>
> I have the following problem : in my JSP, I have a form containing some date
> fields. The value of these date fields is then saved in a database under the
> Sql Date format.
>
> My problem is that, during the populating of the form bean, the
> populate(...) method cannot convert input text into Date format.
>
> Should I use the String type for dates in the form bean ? (but then I need
> to convert them as Date before inserting in the database).
>
> Does somebody have any idea how I could handle the dates ?
>

For the moment, using Strings in your form beans is the best thing to do.  It
also lets you deal with input errors (such as invalid formats).

In future versions of Struts, there will be enhanced support for data type
conversions for classes like dates.

>
> Thanks in advance for any advice.
>
> Veronique Gaboreau.

Craig McClanahan


Reply via email to