Hi We don't support that yet. We do support the injection of @HttpContext fileds, such as UriInfo, HttpHeaders and SecurityContext. Is there any chance you can get what you need from HttpServletRequest from either of those JAX-RS types ? When I get a chance I'll update the code which deals with @HttpContext fileds to also check for @Resource annotated fields...
Cheers, Sergey > > Hi, > > I currently use the JAX-WS WebServiceContext resource injection in my > service bean to be able to access the HttpServletRequest in my SOAP web > services and this works well: > > @Resource > private WebServiceContext context; > > I now need to implement the same web service as a REST service. CXF > 2.1-incubator is great because it includes the JAX-RS frontend, but resource > injection doesn't seem to work. > Form the 0.6 specs, in section 5.1, I should be able to access the > HttpServletRequest: > > "The javax.annotation.Resource annotation can be used to indicate a > dependency on a Servlet-defined resource. An implementation MUST support > injection of the following types: ServletConfig, ServletContext, > HttpServletRequest and HttpServletResponse." > > I thought this simple code would be sufficiant, but apparently it isn't: > > @Resource > private HttpServletRequest request; > > Resource injection is quite new to me, so maybe I'm doing something wrong. > Can somebody help? > > Cheers, > > Mickael > -- > View this message in context: > http://www.nabble.com/JAX-RS%3A-HttpServletRequest-resource-injection-tp16418423p16418423.html > Sent from the cxf-user mailing list archive at Nabble.com. ---------------------------- IONA Technologies PLC (registered in Ireland) Registered Number: 171387 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
