tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <wapedi...@technologist.com>
Subject Setting default Locale
Date Fri, 20 Oct 2000 18:42:22 GMT


Hi!,

How do I set the Default Locale in witch TOMCAT is running?.

I've got the following problem: 

There is a Tomcat running under Win NT. Win NT is running
in Spanish. The default setup for Tomcat makes all the System messages 
appear in Spanish. 

Some test I've done (see bellow) shows that this machine and Tomcat are 
both 
running under the same default Locale (Spanish Spain es_ES).

The problem rises here:

The same version for Tomcat, installed by default under Solaris 8 (Sparc). 
The
same test as before shows that Solaris is running under Spanish Locale but
Tomcat is running under English Locale. Both, OS and Tomcat are running 
under the same OS user. Both use the same JDK.


How do I set Tomcat (under Solaris) to get the default Locale as "es_ES" as
it does under Windows NT?. Is there any parameter in the configuration 
files?.


Thanks for your help.


TESTs done:

I got two simple files for printing the Default
locale for both the Operating System and the Tomcat environment
('a.java' and 'a.jsp', see below). 


* TEST on Windows NT *
Running 'a.class' in Windows NT displays 
     "The Locale is: es_ES".
Using the browser to view the page 'a.jsp' in Tomcat displays 
     "The Locale is: es_ES" 
both in the web browser and in Tomcat console.

So, this machine and Tomcat are both running under the same 
default Locale (es_ES : Spanish Spain).

* TEST on Solaris * 
Running 'a.class' in the Solaris prompt (compiled in the same machine)
displays 
     "The Locale is: es_ES".
Browsing the page 'a.jsp' displays 
     "The locale is: en". 

This shows that Solaris runs under Spanish and Tomcat in English.

The browser is the *same* browser (under Windows NT) used for the 
test in Windows NT.


Source code for files:

***************  a.java  **********
import java.util.*;

public class a {
    public static void main(String args[]) {

        System.out.println("The Locale is: " + Locale.getDefault());
    }
}

**************************************
****************  a.jsp  *************

<html>
<%@ page import="java.util.*" %>
<%
        System.out.println("The Locale is: " + Locale.getDefault());
%>
The Locale is:  
<%= 
         Locale.getDefault()
%>
</html>

***************************************

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message