Link to home
Start Free TrialLog in
Avatar of iharsh
iharshFlag for United States of America

asked on

Date Format in html:text in struts

Hi,

In struts Action form, I have a date field.On Displaying it in JSP using html:text the format which was earlier mm/dd/yyyy automatically changes to yyyy-mm-dd.there is no "format" attribute available with the
html:text.Kindly let me know how do I preserve my date format using html:text
ASKER CERTIFIED SOLUTION
Avatar of malfunction84
malfunction84
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Pass a string to the JSP instead of a Date object. That way you can control the formatting when converting from Date to String (using, e.g. SimpleDateFormatter).