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: -
Locale currentLocale = Locale.getDefault();
-
String str = currentLocale.toString();
-
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
4 12734
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: - -Duser.language=en
-
-Duser.country=US
as the Tomcat's Java parameters
I hope this solution is helpful.
Motoma 3,237
Recognized Expert Specialist
Thanks for your response siliq. Welcome to theScripts!
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: - -Duser.language=en
-
-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.
Hi I have the same problem but i can not find the Java configurations file to change, can you help me?
Thanks.
Sign in to post your reply or Sign up for a free account.
Similar topics |
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...
|
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)...
|
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.
|
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...
|
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.*;
| |
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.
|
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
|
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...
|
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,
|
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...
|
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...
| |
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...
|
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...
|
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...
|
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();...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |