users@jersey.java.net

Re: [Jersey] Injecting user Locale.

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 26 Jan 2009 21:58:21 +0100

Hi Eric,

Do you want to get the value of the Content-Language header? if not
can you provide more details on what you require as the question is
to vague for me to help you.

If i guessed correctly you can inject javax.ws.rs.HttpHeaders:

   @Context HttpHeaders headers;

   ...

   // Get the value of Content-Language
   Locale l = headers.getLanguage();

Paul.

On Jan 26, 2009, at 9:18 PM, Erick Dovale wrote:

> Hi,
> Can any one shade some light as to how to get the client Locale
> injected in a Provider class?
>
> Thanks.