users@jersey.java.net

[Jersey] Re: access to simpleframework HTTP request

From: Robertnac <robertnac_at_googlemail.com>
Date: Fri, 12 Aug 2011 09:24:34 +0200

Hi,

you can use the annotation Context
http://jersey.java.net/nonav/apidocs/latest/jersey/javax/ws/rs/core/Context.html

In your Resouce-Class you write:
@Context
        private javax.ws.rs.core.Request servletRequest;
as class variable and you get the Request.

Regards,

Robert

2011/8/11 Arul Dhesiaseelan <aruld_at_acm.org>:
> Hi,
> I am using Jersey-simple-server module in my application.
> Is there a way to get access to the Request object from the resource? I need
> this to work with the session APIs provided by simpleframework.
> Appreciate any suggestions.
> Thanks,
> Arul