Ulf Dittmer wrote:Looking at the javadocs of javax.ws.rs.core.Context, it only mentions UriInfo, Request, HttpHeaders, SecurityContext and Providers. What are Clemens and I missing?
That is why I left the link at the end of the post.
Apparently"injectability" of HttpServletRequest is part of Jersey, not JAX-RS - so there wouldn't be any mention of it in the documentation of the
javax.ws.rs.core package.
It seems that
com.sun.jersey.spi.inject.PerRequestTypeInjectableProvider is behind that magic.
Paul Sandoz
also mentions that it should be possible to "use a Jersey filter and set properties on @HttpContext" to avoid dependencies on HttpServletRequest - but he doesn't go into any details (though there are some hints
here).