Hello,
sure, you can use ResourceFilters, see ResourceFilterFactory:
http://jersey.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/spi/container/ResourceFilterFactory.html
again, Jersey specific. I know what you are trying to achieve and I see
that we don't have exactly what you need at this moment, but it is
doable (you just need to put a little more effort into that). It should
be better in JAX-RS 2.x implementation, I guess expert group would
include something like this in the spec and then every JAX-RS impl would
require to implement this behavior..
Pavel
On 12/5/11 7:46 PM, Gili wrote:
> Hi Pavel,
>
> This is a very coarse-grained solution. Can you introduce something
> finer-grained like Marc proposed at
> http://java.net/jira/browse/JAX_RS_SPEC-21 ?
>
> Gili
>
>
> Pavel Bucek-2 wrote
>> Hello Gili,
>>
>> you can use ContainerResposeFilter for that. The issue filled against
>> JAX-RS is about having this possibility in spec itself, JAX-RS 1.0
>> doesn't have any specified filtering mechanism (this area will be
>> covered in JAX-RS 2.x).. so ContainerResponseFilter will work only with
>> Jersey.
>>
>> see
>> http://jersey.java.net/nonav/apidocs/latest/jersey/com/sun/jersey/spi/container/ContainerResponseFilter.html
>>
>> Regards,
>> Pavel
>>
>> On 12/5/11 4:30 PM, Gili wrote:
>>> Hi,
>>>
>>> Following up on http://java.net/jira/browse/JAX_RS_SPEC-21 is there a way
>>> for me to generate the default response for a @HEAD and extend it by
>>> adding
>>> some headers? Is there a Jersey-specific API for this sort of thing or
>>> are
>>> we still waiting on an updated specification?
>>>
>>> Thanks,
>>> Gili
>>>
>>> --
>>> View this message in context:
>>> http://jersey.576304.n2.nabble.com/Extending-the-default-Response-tp7063256p7063256.html
>>> Sent from the Jersey mailing list archive at Nabble.com.
>>>
>
> --
> View this message in context: http://jersey.576304.n2.nabble.com/Extending-the-default-Response-tp7063256p7064052.html
> Sent from the Jersey mailing list archive at Nabble.com.
>