File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes change client's locale Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "change client Watch "change client New topic
Author

change client's locale

danny liu
Ranch Hand

Joined: Jan 22, 2004
Posts: 185
I have a client using French Canadian in her browser, which means the locale is French. However, the web site is English and she came across a validation problem when entering a date of US format. The validator verifies it with the French date format because the client's locale is French.

Any idea to fix this? Thanks.
Dan
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41060
    
  43
Just to clarify, you're talking about Struts server-side validations? Because it would be rather unusual to take the client locale into consideration when doing server-side validations (and I'm fairly certain that Struts doesn't do it by itself). The page should make it clear which format is required, and then the server should validate according to that format.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: change client's locale
 
Similar Threads
<s:date name="%{new java.util.Date()}" /> formatDate & i18nInteceptor
API content Question
Showing proper date format on client's browser
bean:write not using locale settings while formatting a date value.
Calendar with Locale