473,806 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tomcat - Locale difference with Console and Windows Service

1 New Member
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\Tomca t\bin\bootstrap .jar and Java Options:
-Dcatalina.base= C:\Program Files\BMJ\Tomca t
-Dcatalina.home= C:\Program Files\BMJ\Tomca t

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 12734
siliq
1 New Member
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 Recognized Expert Specialist
Thanks for your response siliq. Welcome to theScripts!
Mar 20 '07 #3
khadarbasha
1 New Member
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
makinilla
1 New Member
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
3689
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 , /webapps/sue) and i have added the folders bob, sue in my server.xml(in the context path). When i am trying to run jsp files from my browser, it works fine. But, the following jsp files reports some exceptions which is quite hard to understand. Here is...
6
6955
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: javax/servlet/ServletRequest com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:222) com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:109) com.oreilly.servlet.MultipartRequest.(MultipartRequest.java:89)...
3
3181
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 running Tomcat 4.1.27 under Eclipse 2.1.0 using the Sysdeo Tomcat plugin using j2re1.4.1_02 under Windows 2000 SP4. I've digested this down to a small (albeit convoluted) sample that exhibits the behavior reliably on my development workstation.
1
2059
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 cout with a new locale. Currently I am unable to find a list of valid locale strings. The example in documentation is this: locale::global(locale("Fr_CH")); I found some C documentation that had : setlocale(LC_ALL, "da_DK.iso88591"); But I dont...
1
4380
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 program is as follows import java.sql.*; import java.lang.*; import java.io.*; import java.util.*;
12
6550
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 combination to hide the console window at launch time. The application (for legacy reasons) hangs around by waiting on an old- fashioned Console.ReadLine() statement.
24
3396
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 without 'utf8' in it, then things start to go downhill: 2a. The app assumes unicode objects internally. i.e. Whenever there is
0
4224
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 2 running on the server used by other application. Once after installation of the product(HP SIP), I tried to restart the Tomcat 5.0.19 process using below methods(errors reported below respectively) 1) services.msc console Could not start...
0
2939
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 Tomcat 4.1 service on local computer started and then stopped. Some service stop automatically if they have no work to do, for example, the performance logs and alerts sevice". What is it? How can i resove it. Thanks in advance,
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10371
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9192
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7650
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5546
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5683
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.