Yes, I've done this with the servlet filters already. My usecase right now
doesn't use the servlet container which is why I looked to see if the Jersey
filters would provide a similar functionality. Are there any other good
alternatives? Any more suggestions are greatly appreciated.
Thanks.
Martin Matula-3 wrote:
>
> If you are using a servlet container, you can implement a servlet filter
> to do this.
> Martin
>
> On 4.10.2011 10:27, charlesk wrote:
>> Hi,
>>
>> I would like to use a ContainerRequestFilter to return a response right
>> away
>> rather than going through the whole request chain and other lifecycles.
>> Other than throwing a ContainerException, I could not figure out a way to
>> do
>> this. I can flush/close the response but it goes through the rest of the
>> lifecycles.
>>
>> The reason I would like to use ContainerRequestFilter is to catch the
>> request right away if it meets certain url path or certain headers are
>> encountered and return the response right away rather then going through
>> the
>> entire life cycle.
>>
>> Is ContainerRequestFilter right place to do such things? If not, can some
>> one provide any suggestions?
>> Thanks
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://jersey.576304.n2.nabble.com/Using-ContainerRequestFilter-to-return-a-response-right-away-tp6859440p6859440.html
>> Sent from the Jersey mailing list archive at Nabble.com.
>
--
View this message in context: http://jersey.576304.n2.nabble.com/Using-ContainerRequestFilter-to-return-a-response-right-away-tp6859440p6862968.html
Sent from the Jersey mailing list archive at Nabble.com.