tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: container default local problem
Date Thu, 28 Aug 2003 15:08:40 GMT

Howdy,
You probably want to use something like 

// Set the default locale to pre-defined locale
Locale.setDefault(Locale.FRENCH);

See other ways here:
http://javaalmanac.com/egs/java.util/SetDefLocale.html


Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: meissa.Sakho@assetmanagement.natexis.fr
>[mailto:meissa.Sakho@assetmanagement.natexis.fr]
>Sent: Thursday, August 28, 2003 10:41 AM
>To: tomcat-user@jakarta.apache.org
>Subject: container default local problem
>
>
>hi all,
>
>I'm tearing my hair off with the locale value
>of the servlet container.
>
>I'm using tomcat4.1.18 on linux mandrake.
>the machine is configured on french language.
>
>I'm suprised to get the us(instead of fr) locale on my web
applications.
>
>I've written a servlet to test the user locale variable and
>the container local variable.
>
>Here is the code to retrieve the user preferred locale
>and the container locale variable.
>
>Locale preferredLocale = request.getLocale();
>out.println("<p>The user's preffered Locale is " + preferredLocale +
>"</p>");
>
>// Get the container's default locale
>Locale servletContainerLocale = Locale.getDefault();
>
>the first line give me fr while the second gives me us.
>
>Can someone tells me where to set default locale value of the
container.
>
>thanks in advance
>
>Meissa
>
>L'integrite de ce message n'etant pas assuree sur internet, Natexis
>Banques Populaires ne peut etre tenu responsable de
>son contenu. Toute utilisation ou diffusion non autorisee est
>interdite. Si vous n'etes pas destinataire de ce message, merci de le
>detruire et d'avertir l'expediteur.
>
>The integrity of this message cannot be guaranteed
>on the Internet. Natexis Banques Populaires can not therefore be
>considered responsible for the contents.Any unauthorized use or
>dissemination is prohibited.
>If you are not the intended recipient of this message, then please
delete
>it and
>notify the sender.



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


Mime
View raw message