From the Tomcat users mailing list:
It's not entirely clear from the Tomcat documentation, but you aren't
creating environment variables that can be retrieved using
System.getenv. Instead, you are placing entries into the JNDI context.
You'll want to retrieve them like this:
// Obtain our environment naming context
Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
String FOO = (String)envCtx.lookup("FOO");
// now FOO should have the value "bar" from your <Environment>
The documentation for JNDI resources can be found here:
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html
Hope that helps,
Had the same problem and found the solution. You have to recreate the custom.UTF-8
locale def (the "custom" file is probably there because you changed the date or time format). Run
sudo localedef -f UTF-8 -i custom custom.UTF-8
Another way to do this is to add the locale to the ones you want dpkg-reconfigure locales
to configure for you. On Debian:
echo 'custom.UTF-8 UTF-8' |sudo tee -a /etc/locale.gen
sudo dpkg-reconfigure locales
On Ubuntu:
echo 'custom.UTF-8 UTF-8' |sudo tee -a /var/lib/locales/supported.d/local
sudo dpkg-reconfigure locales
Hope this helps!
Best Answer
The
LANG
environment variable determines the language in which software programs communicate with the user.More details are here: Ubuntu Wiki - Environment Variables
For Language, Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called
LANGUAGE
. GNU gettext gives preference toLANGUAGE
overLC_ALL
andLANG
for the purpose of message handling, but you still need to haveLANG
(orLC_ALL
) set to the primary language; This is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, setLANGUAGE=sv:de
while leavingLANG=sv_SE
.More details can be found here: GNU gettext manual - The LANGUAGE variable