Re: date conversion

2008-04-09 Thread Alberto A. Flores
rto A. Flores [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 09, 2008 7:48 AM To: Struts Users Mailing List Subject: Re: date conversion Consider placing the SimpleDateFormat as a local variable (within the method) to avoid non-thread safe operations (guaranteed by the jvm spec). Brad A Cupit

Re: date conversion

2008-04-09 Thread Adam Hardy
esday, April 09, 2008 7:48 AM To: Struts Users Mailing List Subject: Re: date conversion Consider placing the SimpleDateFormat as a local variable (within the method) to avoid non-thread safe operations (guaranteed by the jvm spec). Brad A Cupit wrote: the static SimpleDateFormat (assuming this co

RE: date conversion

2008-04-09 Thread Brad A Cupit
ity - UIS e-mail: [EMAIL PROTECTED] office: 225.578.4774 -Original Message- From: Alberto A. Flores [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 09, 2008 7:48 AM To: Struts Users Mailing List Subject: Re: date conversion Consider placing the SimpleDateFormat as a local variable

Re: date conversion

2008-04-09 Thread Alberto A. Flores
://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html#sy nchronization Brad Cupit Louisiana State University - UIS -Original Message- From: Zoran Avtarovski [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 08, 2008 7:30 PM To: Struts Users Mailing List Subject: Re: date conversion

RE: date conversion

2008-04-09 Thread Brad A Cupit
Avtarovski [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 08, 2008 7:30 PM To: Struts Users Mailing List Subject: Re: date conversion We had the same issue and went with writing a new converter (shown below). And then created a xwork-conversion.properties file pointing to it. Z. private final

Re: date conversion

2008-04-09 Thread Alberto A. Flores
Also, consider to inject the format in your IoC container (Guice, Spring, etc). Zoran Avtarovski wrote: We had the same issue and went with writing a new converter (shown below). And then created a xwork-conversion.properties file pointing to it. Z. private final static SimpleDateFormat D

Re: date conversion

2008-04-08 Thread Zoran Avtarovski
We had the same issue and went with writing a new converter (shown below). And then created a xwork-conversion.properties file pointing to it. Z. private final static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd/MM/"); @Overridepublic Object convertFromString(Map contex

Re: date conversion

2008-04-08 Thread Adam Hardy
Can you patch a whole class? What would be useful is parameterizable type converters, to specify the date format in this case. (they're not parameterizable, are they?) Dave Newton on 08/04/08 22:13, wrote: --- Adam Hardy <[EMAIL PROTECTED]> wrote: One area where S1 actually had the upper han

Re: date conversion

2008-04-08 Thread Dave Newton
--- Adam Hardy <[EMAIL PROTECTED]> wrote: > One area where S1 actually had the upper hand :( Submit a patch :) Dave > Dave Newton on 08/04/08 18:36, wrote: > > The built-in type converter uses "uses the SHORT format for the Locale > > associated with the current request" according to the type co

Re: date conversion

2008-04-08 Thread Adam Hardy
OK thanks guys. One area where S1 actually had the upper hand :( Dave Newton on 08/04/08 18:36, wrote: The built-in type converter uses "uses the SHORT format for the Locale associated with the current request" according to the type conversion docs, so yes, you'll need to do your own if you're

RE: date conversion

2008-04-08 Thread Dave Newton
The built-in type converter uses "uses the SHORT format for the Locale associated with the current request" according to the type conversion docs, so yes, you'll need to do your own if you're using a different input format. Looking through the XWork conversion code it's hard for me to tell what it

RE: date conversion

2008-04-08 Thread Brad A Cupit
JSTL has the tag. If you want to do it in Java, rather than your JSP, you can use SimpleDateFormat. Be aware that SimpleDataFormat is not thread safe, so don't assign it to a static field or use it in a singleton. If you use it as an instance field on an Action you'll be safe, since Actions ar