tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nimish <>
Subject Re: Internationalization Help
Date Thu, 26 Feb 2004 17:28:14 GMT
> All,
> I am sure Tomcat can be internationalized to accept
> internationalized
> character encoding, but the trouble is I do not know
> HOW?
> Could someone point me to a quick HOW-TO guide?
> BTW I am planning to use 4.1.30 (or later version)
> for this purpose. 
> Any help very much appreciated.
> Regards,
> Santosh

You need to use ResourceBundle with properties files
that are specific to various locales. Keep your
default locale strings in a file named something like
<app_name>.properties in the WEB-INF/classes directory
of your application in Tomcat's webapps. You can also
keep other locale files in
<app_name>_<locale>.properties. [For example,
<app_name> for German strings,
<app_name> for French strings, etc.] 

Then you can load the strings using 

ResourceBundle rb =

That will pick the correct properties file depending
on your browser locale. (This can be changed by
changing the Language preferences in Browser, for

The required string can be retrived in a JSP or
Servlet using rb.getString("<property_name>");

- Nimish

Do you Yahoo!?
Get better spam protection with Yahoo! Mail.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message