You could think of it as a business logic function and do it (the date/String conversion)in the middle tier and pass it to the view already to go. It seems like the date format would be the same if you were printing it to a JSP page or a Swing GUI. If you ever had to support two or more front end types then you wouldn't have to change the format in multiple places because it would be sent to the view as it would be displayed.
Just a thought since I am working on, for the first time, a project which actually has a Web part and a Swing part and many components are shared (at least I am trying, others here are not so into sharing :) -----Original Message----- From: Riaan Oberholzer [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 8:41 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: [Q] Struts and date formatters Is there a solution without using JSTL? I run on BEA WebLogic 6.1sp2 and there is a known bug which limits the number of external jars you can import into an application. Do a google search for CR064391_610sp2.jar for more details on that. Anyway, we cannot upgrade to a new version soon, which means we have to reduce the number of libs we import. It sucks, but its reality. :( --- Alex Shneyderman <[EMAIL PROTECTED]> wrote: > Use JSTL's formatDate tag. Very easy to use and lets > you format your > date any way you want it. Example: > > <fmt:formatDate value="${yourDate}" > pattern="yyyy-MM-dd HH:mm" /> > > it is that simple. > Alex. > > > -----Original Message----- > > From: Riaan Oberholzer > [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, August 06, 2003 8:30 AM > > To: [EMAIL PROTECTED] > > Subject: [Q] Struts and date formatters > > > > I am using the <bean:write> tag and for date > fields > > (java.util.Date), I get the (rather ugly) full: > > > > Wed Aug 06 12:08:07 CEST 2003 > > > > I have tried to do: > > > > DateFormdat df = DateFormat.getDateTimeInstance(); > > SimpleDateFormat sdf = (SimpleDateFormat)df; > > sdf.applyPattern("yyyy-MM-dd hh:mm"); > > > > But it gets ignored.... how/where can I change the > > default pattern that struts uses to format dates > with? > > > > Thanks. > > > > __________________________________ > > Do you Yahoo!? > > Yahoo! SiteBuilder - Free, easy-to-use web site > design software > > http://sitebuilder.yahoo.com > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > [EMAIL PROTECTED] > > For additional commands, e-mail: > [EMAIL PROTECTED] > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]