I know that struts2 can convert strings to Dates when populating the fields of my controller, however, it does so assuming the date string is in SHORT format. Is there a way to specify a different format for struts to use (for example, ‘yyyy-MM-dd’)?
Share
You need to create your own CustomType converter which can change the given date to any format.
Something like
You can get more details form Struts2 official documents and here are the details
Struts2 Custom Type Conversion