!asyncSupported exception when switch from Jetty 7 to Jetty 9

Ah, the evolution of the spec ...

  • Jetty 7 was Servlet 2.5 (no async there)
  • Jetty 8 was Servlet 3.0 (async introduced) - spec was vague on what was default, so Jetty defaulted to async-supported == true
  • Jetty 9 is Servlet 3.1 (even more async) - the spec was clarified, and jetty chose its default poorly. The default according to the spec is async-supported == false

That's why you didn't have to specify async-supported in the past, but now you do.

Bug about this bugs.eclipse.org/410893

Commit: 9bf7870c7c8a209f2660f63c14dd4acb62b07533


My exception is the same to you. then I put "<async-supported>true</async-supported>" append to every servlet and filter. it work well. For excample

<filter>
    <filter-name>continuation</filter-name>
    <filter-class>org.eclipse.jetty.continuation.ContinuationFilter</filter-class>
    <async-supported>true</async-supported>
</filter>

<servlet>
    <servlet-name>cometd</servlet-name>
    <servlet-class>org.cometd.annotation.AnnotationCometdServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    <async-supported>true</async-supported>
</servlet>

the other hand. if you used jetty9.x. you'd better update your comet jar to version 3.0.x or later. I hope it will help you.

Tags:

Java

Jetty

War