struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <>
Subject [jira] [Commented] (WW-3841) Struts 2 losing timestamp in java.util.Date when validation failed
Date Mon, 28 Jan 2013 13:25:13 GMT


Lukasz Lenart commented on WW-3841:

I think the problem is related how the date is displayed and why it's converted back to value
without milliseconds.

The problem is in Login.jsp which defines how to display the value:

<s:textfield key="" value='%{getText("{0,date,dd/MM/yyyy HH:mm:ss.SSS}",{})}'/>

but as I said before, DateConverter trims .SSS part and that's why milliseconds are dropped
or rather reset to .000
> Struts 2 losing timestamp in java.util.Date when validation failed
> ------------------------------------------------------------------
>                 Key: WW-3841
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors
>    Affects Versions: 2.3.3
>         Environment: jdk 1.6, windows
>            Reporter: J. Garcia
>             Fix For: 2.3.9
>         Attachments:
> A full example based on struts2 blank archetype attached.
> Run with maven2: mvn jetty:run
> Url: http://localhost:8080/struts-test/example/Login
> Enter as year of birth a bad integer: 1980aaa
> You'll see the timestamp still there, BUT the milliseconds are set to zero. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message