1、注意添加
2、如果集成了shiro一定要注意在mapping中增加dispatcher项,否则会抛出org.apache.shiro.UnavailableSecurityManagerException异常
3、如果项目用到了ehcache gzip filter,在异步请求返回时会抛出java.io.IOException: write beyond end of stream异常,解决方案是将gzip filer 换成com.googlecode.webutilities的compressionFilter
<async-supported>true</async-supported>在web.xml中对DispatcherServlet和所有filter添加<async-supported>true</async-supported>2、如果集成了shiro一定要注意在mapping中增加dispatcher项,否则会抛出org.apache.shiro.UnavailableSecurityManagerException异常
<filter-mapping>
<filter-name>shiroFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>ASYNC</dispatcher>
</filter-mapping>3、如果项目用到了ehcache gzip filter,在异步请求返回时会抛出java.io.IOException: write beyond end of stream异常,解决方案是将gzip filer 换成com.googlecode.webutilities的compressionFilter
本文详细介绍了在项目中遇到的异步请求问题,包括如何在web.xml中配置DispatcherServlet和filter以支持异步请求,以及如何正确集成Shiro并避免未可用的安全管理异常。还提供了解决使用ehcachegzipfilter导致的java.io.IOException:writebeyondendofstream异常的方法。

1万+

被折叠的 条评论
为什么被折叠?



