wood burning stoves 2.0*
The moose likes Struts and the fly likes How to get dates to ActionForm in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to get dates to ActionForm in Struts" Watch "How to get dates to ActionForm in Struts" New topic
Author

How to get dates to ActionForm in Struts

Deli Dumrul
Greenhorn

Joined: Jul 06, 2004
Posts: 9
Hi,

I am using MySQL and i have a birthdate column whose type is date. To be able to insert into this field, how should i define birthdate field in my JSP and actionform.

Thanks
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I haven't used this in a while but I'm pretty sure you do it with the regular <html:text> tag. Struts uses the BeanUtils library internally to convert the request parameters (which are always strings anyway) into the type indicated by your <form-bean/> element in struts-config.xml or by your ActionForm class.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get dates to ActionForm in Struts
 
Similar Threads
date field in struts
scalar functions
JUnit on getAge (How to get a decent solution)
collecting and validating dates
Required field usage