473,387 Members | 1,582 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Tomcat - Locale difference with Console and Windows Service

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
4 12695
siliq
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
3,237 Expert 2GB
Thanks for your response siliq. Welcome to theScripts!
Mar 20 '07 #3
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
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

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

Similar topics

0
by: Jagdeesh | last post by:
Hai Colleagues, I am using Tomcat 4.1.24 and JDK 1.4.0_03 in my winXP machine. I've transferred a set of folders(containing jsp files) into tomcat's webapps directory(to /webapps/bob ,...
6
by: jajoo | last post by:
Hi, I have a problem with using *.jar files with Tomcat 5.0.16. I place the jar in the lib directory of the application but server throws Exception. java.lang.NoClassDefFoundError:...
3
by: Alan Krueger | last post by:
Greetings, I've been able to cache Transformer objects in a Tomcat-based servlet application to avoid unnecessary Transformer rebuilding, except for certain ones on certain machines. I'm...
1
by: Klaus Gr?nb?k | last post by:
Hi all Im from Denmark and we have a few charcters in our alphabet that are not standard ASCII (æåøÆÅØ). I want to be able to print these characters to the console, but for that i need to imbue...
1
by: kommaraju | last post by:
iam a starter to db2 & jdbc.i have a servlet program which connects to ibm db2 using jdbc.when i run this using apache tomcat 4.1.34 , it is showing a error message of HTTP STATUS 500 my jdbc...
12
by: Dilip | last post by:
Hi All I have a server based C# console application. This application must hide its console window when its launched out on the field. So I dutifully P/Invoke'd FindWindow/ShowWindow...
24
by: Donn Ingle | last post by:
Hello, I hope someone can illuminate this situation for me. Here's the nutshell: 1. On start I call locale.setlocale(locale.LC_ALL,''), the getlocale. 2. If this returns "C" or anything...
0
by: Arun21084 | last post by:
Hi, Recently I installed an application HP SIP(Service Information Portal) on a Windows 2000 server.The application comes along with an installation of Tomcat 5.0.19. Already there was an Apache...
0
rsrinivasan
by: rsrinivasan | last post by:
Hi all, I am using tomcat4.1. I changed this(tomcat) as windows service. And it said that tomcat is successfuly installed as service. when i start tomcat from service option, it throws "The Apache...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.