Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Null HttpChannel.getCurrentHttpChannel() in ServletHandler.doFilter()


On Fri, Jul 18, 2014 at 7:10 PM, Matt Deimel <mdeimel@xxxxxxxxx> wrote:
> Joakim - thanks for your response.
> I have been using ProxyServlet.Transparent, but I see the same result if I
> use AsyncProxyServlet or AsyncProxyServlet.Transparent

We need more details of how this is supposed to work.
If you have a filter in front of the ProxyServlet and a request hits
your initial problem, the ProxyServlet is out of the picture.
Details, please.

> I'm actually creating a subclass of ProxyServlet.Transparent so that I can
> change how the AsyncContext is started. Currently it is started with
> "request.startAsync()", which I believe will overwrite the async context
> that was started by a filter. So I change that to first check if
> isAsyncStarted(), and if so, then call request.getAsyncContext() to make use
> of the existing context. I'm not 100% sure of this is a Jetty bug, or if the
> proxy needs to ignore any existing AsyncContext.

Again, missing details.
If the filter calls startAsync(), then it's not supposed to chain. The
filter should handle the asynchrony, and then call dispatch().

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.

Back to the top