[jax-rs-spec users] [jsr339-experts] Re: Binding of ContainerRequestContext to Servlet

From: Sergey Beryozkin <>
Date: Fri, 7 Sep 2012 12:34:02 +0100

On 07/09/12 10:37, Sergey Beryozkin wrote:
> The documentation for all the ContainerRequestContext methods to do with
> retrieving or setting the properties refers to Servlet (effectively
> HttpServletRequest) attributes.
> getPropertyNames() even returns Enumeration.
> This concerns me a bit. I think if some users are keen to work with
> Servlet API in context of JAX-RS then they will expect more than just
> the ability to get an access to the underlying Servlet attributes. In
> other words, they'd want HTTPServletRequest.
> AFAIK, the whole idea was to be able to exchange properties between the
> filters, as such I do not see why Servlet even has to be mentioned, and
> the ancient legacy Enumeration interface has to be introduced into the
> signature.
> It also may send a message that JAX-RS is some kind of thin wrapper on
> top of Servlet API.

ContainerResponseContext should also have the same capability to pass
the properties between the response filters for the consistency
purposes, which IMHO further highlights the fact that the binding to
Servlet attributes at the request level needs to be hidden - of course,
the similar binding to Servlet response can be documented at
ContainerResponseContext - but that would not be right...

Cheers, Sergey

> Thoughts ?
> Cheers, Sergey