SPRINGMVC Project Asynchronous error handling request Async support must is enabled on a servlets and for all filters involved in async

Source: Internet
Author: User


Next to GitHub on a project, Springmvc-chat. There are labels in general. This is the 0 configuration.

It can be hard for me, and the final integration into the project now looks a bit. Out the following error. Red part. The workaround is to add a sentence to the general configuration file in Web. XML, which is SPRINGMVC:
<async-supported>true</async-supported>
The position of this sentence must be put correctly, otherwise. Everything was in vain. As for configuring spring asynchronous support (in fact, configuring servlet async support), see the placement location.

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvz2lzcmvkzxzlbg9wbwvuda==/font/5a6l5l2t/fontsize/400/fill/ I0jbqkfcma==/dissolve/70/gravity/center ">

On May 16, 2014 4:30:59 pm org.apache.catalina.core.StandardWrapperValve invoke severity: Servlet.service () for Servlet [SPRINGMVC ] In the context with the path [/ZHDM] threw exception [Request processing failed; nested exception is JAVA.LANG.ILLEGALSTATEEXCEP Tion:async support must is enabled on a servlets and for all filters involved in Async request processing. This is do in Java code using the Servlet API or by adding ' <async-supported>true</async-supported> ' to serv Let and filter declarations in Web.]  With root Causejava.lang.IllegalStateException:Async support must is enabled on a servlets and for all filters involved in Async request Processing. This is do in Java code using the Servlet API or by adding ' <async-supported>true</async-supported> ' to serv Let and filter declarations in web.xml.at org.springframework.util.Assert.state (assert.java:385) at Org.springframework.web.context.request.async.StandardServletAsyncWebRequest.startAsync ( Standardservletasyncwebrequest. java:104) at Org.springframework.web.context.request.async.WebAsyncManager.startAsyncProcessing ( webasyncmanager.java:431) at Org.springframework.web.context.request.async.WebAsyncManager.startDeferredResultProcessing ( webasyncmanager.java:409) at Org.springframework.web.servlet.mvc.method.annotation.DeferredResultMethodReturnValueHandler.handleReturnValue ( DEFERREDRESULTMETHODRETURNVALUEHANDLER.JAVA:51) at Org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue ( HANDLERMETHODRETURNVALUEHANDLERCOMPOSITE.JAVA:71) at Org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle ( servletinvocablehandlermethod.java:122) at Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod ( requestmappinghandleradapter.java:749) at Org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal ( requestmappinghandleradapter.java:690) at ORG.SPRINGFRAMEWORK.WEb.servlet.mvc.method.AbstractHandlerMethodAdapter.handle (abstracthandlermethodadapter.java:83) at Org.springframework.web.servlet.DispatcherServlet.doDispatch (dispatcherservlet.java:945) at Org.springframework.web.servlet.DispatcherServlet.doService (dispatcherservlet.java:876) at Org.springframework.web.servlet.FrameworkServlet.processRequest (frameworkservlet.java:961) at Org.springframework.web.servlet.FrameworkServlet.doGet (frameworkservlet.java:852) at Javax.servlet.http.HttpServlet.service (httpservlet.java:618) at Org.springframework.web.servlet.FrameworkServlet.service (frameworkservlet.java:837) at Javax.servlet.http.HttpServlet.service (httpservlet.java:725) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (applicationfilterchain.java:301) at Org.apache.catalina.core.ApplicationFilterChain.doFilter (applicationfilterchain.java:206) at Org.apache.tomcat.websocket.server.WsFilter.doFilter (wsfilter.java:52) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (Applicationfilterchain.java:239) at Org.apache.catalina.core.ApplicationFilterChain.doFilter ( applicationfilterchain.java:206) at Org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal ( characterencodingfilter.java:88) at Org.springframework.web.filter.OncePerRequestFilter.doFilter ( onceperrequestfilter.java:108) at Org.apache.catalina.core.ApplicationFilterChain.internalDoFilter ( applicationfilterchain.java:239) at Org.apache.catalina.core.ApplicationFilterChain.doFilter ( applicationfilterchain.java:206) at Org.apache.catalina.core.StandardWrapperValve.invoke ( standardwrappervalve.java:219) at Org.apache.catalina.core.StandardContextValve.invoke (Standardcontextvalve.java : 106) at Org.apache.catalina.authenticator.AuthenticatorBase.invoke (authenticatorbase.java:503) at Org.apache.catalina.core.StandardHostValve.invoke (standardhostvalve.java:136) at Org.apache.catalina.valves.ErrorReportValve.invoke (errorreportvalve.java:74) at Org.apache.catalina.valves.AbstractAccessLogValve.invoke (abstractaccesslogvalve.java:610) at Org.apache.catalina.core.StandardEngineValve.invoke (standardenginevalve.java:88) At Org.apache.catalina.connector.CoyoteAdapter.service (coyoteadapter.java:516) at Org.apache.coyote.http11.AbstractHttp11Processor.process (abstracthttp11processor.java:1015) at Org.apache.coyote.abstractprotocol$abstractconnectionhandler.process (abstractprotocol.java:652) at Org.apache.coyote.http11.http11aprprotocol$http11connectionhandler.process (http11aprprotocol.java:277) at Org.apache.tomcat.util.net.aprendpoint$socketprocessor.dorun (aprendpoint.java:2451) at Org.apache.tomcat.util.net.aprendpoint$socketprocessor.run (aprendpoint.java:2440) at Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1145) at Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:615) at Java.lang.Thread.run ( thread.java:744)


Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

SPRINGMVC Project Asynchronous error handling request Async support must is enabled on a servlets and for all filters involved in async

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.