!asyncSupported exception when switch from Jetty 7 to Jetty 9

Viewed 5034

we recently upgraded our jetty version. when we did this both of our legacy gui war files, which no one has modified in some time, stopped working correctly. I believe I hunted the root cause to the proxy (used to proxy to a restful interface on another port), any call to the proxy throws the exception:

 IllegalStateException: !asyncSupported

I'm not sure why this would occure with 1.9 but not with the old jetty. I can't build the war file currently, it was a mess that only one developer could ever build, but I trid unzipping it with jetty -x and ading to the servlet section of the web.xml file this:

<async-supported>true</async-supported>

and then rezipping it with jar c command. that didn't seem to help, though now i get exceptions in my jetty log fhile while before they would only show in the browser.

can anyone tell me what to do to activate async support and/or why the switch in jetty would cause this?

4 Answers

For Java based config you may use

@javax.servlet.annotation.WebServlet(name = "HelloWorld",urlPatterns = { "/MyServlet" },asyncSupported =true)
Related