You can use an annotated member like the following in your resource class:
@Context
javax.ws.rs.core.UriInfo uriInfo;
Then later use UriInfo methods to get at various component of the url.
On 11/14/2011 03:28 PM, Blaise Gervais wrote:
> Hi everyone,
>
> I have a custom MessageBodyWriter from which I would like to know the
> url used to
>
> access the resource to render. But I don't know how to achieve that.
>
> Is there a way to know the URL used to access a resource ?
>
> Thanks