Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic