| Author |
Is this the best way to format dates in Spring?
|
Dave Alvarado
Ranch Hand
Joined: Jul 02, 2008
Posts: 388
|
|
Hi,
I'm using Spring 3.0. I wanted to take advantage of Spring forms, so I had
where endDate is a java.util.Datefield of my command object. However, I notice that the date is printed out in verbose format, and I would prefer to apply a formatting to it. The only way I have found so far is to abandon Spring forms and go with
I don't like this mixed Spring form/non-Spring form approach and so I wanted to ask if there's something I'm missing or if this is the only way to do it.
Thanks, - Dave
|
 |
Christophe Verré
Marshal
Joined: Nov 24, 2005
Posts: 14361
|
|
|
Instead, you can take advantage of Spring 3 Field Formatting.
|
[SCBCD Wall of Fame] [My Blog]
All roads lead to JavaRanch
Help Japan. Make a donation.
|
 |
Bear Bibeault
Author and opinionated walrus
Marshal
Joined: Jan 10, 2002
Posts: 50691
|
|
|
Personally, I would never use a proprietary tag when a standard one is available. I have no problem with a "mixed approach" that involves the JSTL.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: Is this the best way to format dates in Spring?
|
|
|