Hi,

I am looking to add internationalization on my webservice that work on tomcat.
In one old documentation of Tomcat, it's speak about the Header parameter 
"Accept-Language" that is read by StaticInterceptor and set the Locale.
Source : http://tomcat.apache.org/tomcat-3.3-doc/serverxml.html

It's just what I need to use the right ResourceBundle with out adding 
explicitly a parameter in all my services.
But I don't find others documentation about it... On newer version (I use 
tomcat 6) or on how configure it.


I did some test for see if the parameter is send (and it's)
    @POST
    @Path("/create/")
    public WSBooleanResponse create(EnvoyerEmailActivationCompteProxy tiers, 
@HeaderParam("Accept-Language") String language) {
        ServiceResponse response = createDefaultServiceResponse();

        System.out.println(language);

        if(language != null){
            LocaleEditor le =new LocaleEditor();
            le.setAsText(language);
            Locale.setDefault((Locale) le.getValue());
        }

But I don't have StaticInterceptor declared in my server.xml and I don't know 
where I need to put it in the structure.

If someone have any experience on it, or any documentation. It's will help me a 
lot.

Truly,



Patrick Kolodziejczyk
Ingénieur Conception et Développement
BU technologies - Groupe Viseo
190, rue Garibaldi - 69003 LYON
Tél.  +33 (0)4 72 33 78 30
http://www.viseo.com<http://objetdirect.com/>

Reply via email to