Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3836

Struts 2 losing timestamp in java.util.Date when validation failed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.3.1.2
    • 2.3.7
    • None
    • None

    Description

      I have a form with java.util.Date (createTimestmp) and it has both date & time.

      createTimestmp is an hidden field on the form. When I fetch record from database it has "5/17/12 12:58:33 PM.688" as value.

      If I change something on the form and if validation is GOOD, then creatTimestmp value is retained to the original value. That is, its still "5/17/12 12:58:33 PM.688".

      But if the validation fails, and user goes to input form again, then createTimestmp value changes to "5/17/12". The timestamp is missing.

      Looks like a bug to me in struts 2.

      Why is struts 2 dropping timestamp on INPUT result...?

      Can someone please help.

      Attachments

        Issue Links

          Activity

            People

              lukaszlenart Lukasz Lenart
              sam2012 Sam
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: