I can think of a couple of ways:

1.  Store your dateCreated object as a request or session attribute and
access it from your action form;

2.  Pass it as a string and use the java.sql.Timestamp.valueOf() method to
change it back to a Timestamp.

Mark

-----Original Message-----
From: Hair, Jeffrey [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 29, 2002 2:49 PM
To: Struts User Mailing List (E-mail)
Subject: Storing date & time stamp within html form


I'm trying to preserve the date & time stamp of an object by storing the
value in an html element and have struts automatically populate my
ActionForm object with the value upon submit.

Specifically, I have an object of type java.sql.Timestamp contained within
my ActionForm. My jsp code is this:


<html:form action="actionMapping">
<html:hidden property="dateCreated"/>
...
</html:form>


This works fine for writing the hidden html but an exception is thrown when
the form is submitted. I'm looking into using jakarta's Datetime taglib in
combination with struts.

Has anyone else crossed this that is able to give an example or a direction
that will work? Unfortunately, changing my ActionForm attribute to be of
type String instead of Date is not an option.

Thanx,
jsh

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to