By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,361 Members | 1,700 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,361 IT Pros & Developers. It's quick & easy.

Tomcat - Locale difference with Console and Windows Service

P: 1
I am using Windows XP, Tomcat 5.5.17, JRE 1.5.0_08. I am in Australia. For testing localization, my Windows Region is set to English, US.

The Tomcat xml's are set to their install defaults.

When using the Console, tomcat5.exe, my localization files work correctly, returning the Locale, en_US in the string str.

When using Windows Services, the Locale string returned is en.AU with the same code and the Region still set to English, US.

The code used is:
Expand|Select|Wrap|Line Numbers
  1. Locale currentLocale = Locale.getDefault();
  2. String str = currentLocale.toString();
  3.  
In the Services I am using a Classpath command: C:\Program Files\BMJ\Tomcat\bin\bootstrap.jar and Java Options:
-Dcatalina.base=C:\Program Files\BMJ\Tomcat
-Dcatalina.home=C:\Program Files\BMJ\Tomcat

Any help explaining how to get the default Locale using Services would be appreciated. I do not want to set the Locale, but to get and apply my users default Locale using Services.

The same applies to the use of the Robot class used for sending keystrokes. OK with Console, no response or error with Services.

Thanks
Max
Nov 4 '06 #1
Share this Question
Share on Google+
4 Replies


P: 1
Hi max
I came across the same problem as you are.

I cannot explain the underlying reason, but I could offer you a walk-around solution:

add in:
Expand|Select|Wrap|Line Numbers
  1. -Duser.language=en
  2. -Duser.country=US
as the Tomcat's Java parameters

I hope this solution is helpful.
Mar 19 '07 #2

Motoma
Expert 2.5K+
P: 3,235
Thanks for your response siliq. Welcome to theScripts!
Mar 20 '07 #3

khadarbasha
P: 1
Hi max
I came across the same problem as you are.

I cannot explain the underlying reason, but I could offer you a walk-around solution:

add in:
Expand|Select|Wrap|Line Numbers
  1. -Duser.language=en
  2. -Duser.country=US
as the Tomcat's Java parameters

I hope this solution is helpful.
Hi Sliq,
I was facing the same problem. it worked me too. thank you.

Regards,
Khadar.
Jun 28 '07 #4

P: 1
Hi I have the same problem but i can not find the Java configurations file to change, can you help me?

Thanks.
Jul 17 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.