Meaning of asyncSupported in web.xml

I recently switched some parameters from my main UI and a couple of hardcorded others that were scattered across to code to a web.xml.

My app uses server pushes, so that’s why I have my @Push annotation on tot of my main UI class, even before declaring it.

I noticed that after doing these changes, I’m seeing on the logs a bunch of IllegalStateException exceptions related to asynchronous operations:

at org.apache.catalina.connector.Request.startAsync(Request.java:1673)
java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations.

Sometimes a companion text appears with the exception itself. It’s localized, so I’ll try to localize it:

Servlet.service() for servlet [MyAppServlet]
in context with path threw the exception [com.vaadin.server.ServiceException: java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations.]
with root cause

I notice one of the parameters I moved from the @WebServlet annotatoin to my web.xml is

<init-param>
        <param-name>asyncSupported</param-name>
        <param-value>true</param-value>
</init-param>

but I fail to find the meaning of this parameter. What is this for? May it be related to my exceptions?

The only other parameter I changed while doing these modifications was adding a @PreserveOnRefresh, which I wasn’t doing before. Could that be related, also?

Ok - my shame. It seems it was my fault.

After browsing across the forum I found another thread with people experiencing similar exceptions and thanks to that I discovered that I made the wrong “translation” from annotation to web.xml for the asyncSuported param.

In fact, it’s clearly stated here:

https://vaadin.com/docs/v7/framework/advanced/advanced-push.html

So I used this in my web.xml:

<init-param>
          <param-name>pushmode</param-name>
          <param-value>automatic</param-value>
</init-param>
<async-supported>true</async-supported>

and to this moment I got rid of “asynchronous operations” exceptions.