Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get dates to ActionForm in Struts

 
Deli Dumrul
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!