aspose file tools
The moose likes Struts and the fly likes How to get dates to ActionForm in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: How to get dates to ActionForm in Struts
 
Similar Threads
collecting and validating dates
date field in struts
Required field usage
JUnit on getAge (How to get a decent solution)
scalar functions