Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Calling startAsync() on a servlet request throws java.lang.IllegalStateException: s=DISPATCHED i=true a=STARTED


On Tue, Feb 21, 2017 at 6:47 PM, Sanjay Bhat <Sanjay.Bhat@xxxxxxxxxxxxxx> wrote:
> Is the "IllegalStateException" being thrown because the startAsync() method
> is being called twice on the same request - for the first time in my filter
> and for the second time in Jetty ProxyServlet's service() method?


> If yes, is there no way to use an "AsyncListener" in a filter chain that is terminated
> by Jetty's ProxyServlet?

Multiple startAsync() calls are supported by the Servlet Spec (and of
course in Jetty), but only in consecutive cycles.

The real question is: why you call startAsync() in your filter and
then chain to the ProxyServlet ?

Simone Bordet
Developer advice, training, services and support
from the Jetty & CometD experts.

Back to the top