You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by HÃ¥ken Stark <ha...@integrate.no> on 2008/10/16 14:00:12 UTC

Trouble with i18n and Struts2

When locale is changed using the 'request_locale' parameter in struts,  an error occurs while trying to save a form with a textfield or hiddenfield associated with a Date object. For example when the language is set to Norwegian default by the browser, and I change the language to English using the 'request_locale' I get the error below and the form won't save. This happens the opposite way also.

2008-10-13 11:23:40,484 ERROR [com.opensymphony.xwork2.interceptor.ParametersInterceptor] - <ParametersInterceptor - [setParameters]: Unexpected Exception caught setting 'customerUser.created' on 'class com.integrate.proteket.actions.customer.CustomerUserAction: Error setting expression 'customerUser.created' with value '[Ljava.lang.String;@10d345a'>

The date is parsed differently depending on the 'locale', and it seems like the ParametersInterceptor is having problems parsing the date when the 'request_locale' is set to a different 'locale' value then the browser default. Same behavior in either IE or FF.

Any tips on how I can avoid this?


Regards
Ronny