tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maxt <maxtel...@yahoo.com.au>
Subject Re: Locale difference with Console and Windows Service
Date Sat, 04 Nov 2006 18:12:49 GMT



Christopher Schultz-2 wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Max,
> 
>> I am using Windows XP, Tomcat 5.5.17, JRE 1.5.0_08. I am in Australia. To
>> test localization, my Windows Region is set to English, US. 
> 
> Is the locale of your /user/ set to en_US, or is the whole OS set to that?
> 
> The Windows OS is therefore set to US. When I refer to a user, I am not
> referring to a Unix type user but a customer who may be in any Region or
> Locale.
> 
>> When using the Console, tomcat5.exe, my localization files work
>> correctly,
>> returning the Locale, en_US. 
>> 
>> When using Windows Services, the Locale returned is en.AU with the same
>> code
>> and Region still set to English, US. 
> 
> Since windows services run as another user (I'm sure you can pick), you
> need to make sure that the locale of /that/ user is set appropriately.
> Is it possible that the user that services "run as" is not configured
> for en_US?
> 
> Why does a Service pick up another Locale to the use of a Console?
> Everything else is the same. Run as Console is OK, then run as a Servie
> and it is picking up the original Region set on Java installation (that
> has since been changed for testing) perhaps??
> 
>> 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. 
> 
> In our apps, we sniff the locale of the user from the request and stick
> it in the session (actually, Struts does that for us). You can then use
> that locale for resource bundles, time and date formatting, etc. Any
> reason to worry about the "default" locale in your case?
> 
> The resource bundles work OK for Console, but not for Service.
>> The same problem applies to the use of the Robot class used for sending
>> keystrokes. OK with Console, no response or error with Services. 
> 
> Well, that's a different problem. Do services have a console to run in?
> I would imagine that the service gets run in a manner quite like a UNIX
> app with no X availability. If that's true, then there's nothing to
> which you can send keystrokes.
> 
> The keystrokes are being sent to HTML fields in a JSP page.
> 
> I am not using Struts.
> 
> Max
> 
> - -chris
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.5 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iD8DBQFFTJvj9CaO5/Lv0PARAqgLAJ9aRaywkobHMGvqQ2vAhqnSVT4P1ACgpJCl
> Dr36WjN6ehgKCzoGe1jhRAs=
> =V6iz
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Locale-difference-with-Console-and-Windows-Service-tf2572041.html#a7177248
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message