Accept
header or a language that is the value of the Accept-Language
header. This filter may be used when the accetable media type and acceptable language need to be declared in the URI.
This class may be extended to declare the mappings and the extending class, foo.MyUriConnegFilter
say, can be registered as a container request filter. When an application is deployed as a Servlet or Filter such a filter can be registered using the following initialization parameters:
<init-param> <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name> <param-value>foo.MyUriConnegFilter</param-value> </init-param>
If a suffix of "atom" is regstered with a media type of "application/atom+xml" then a GET request of:
GET /resource.atom
is transformed to:
GET /resource Accept: application/atom+xmlAny existing "Accept" header value will be replaced.
If a suffix of "english: is regstered with a language of "en" then a GET request of:
GET /resource.english
is transformed to:
GET /resource Accept-Language: enAny existing "Accept-Language"header value will be replaced.
The media type mappings are processed before the language type mappings. @author Paul.Sandoz@Sun.Com @see com.sun.jersey.api.container.filter
|
|
|
|
|
|
|
|