users@jersey.java.net

[Jersey] Re: Using ContainerRequestFilter to return a response right away

From: Martin Matula <martin.matula_at_oracle.com>
Date: Tue, 04 Oct 2011 23:51:27 -0700

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.