Struts2中的开启AsyncContext的方法

//获取到request
HttpServletRequest req = ServletActionContext.getRequest();

//设置属性
org.apache.catalina.ASYNC_SUPPORTED为true
req.setAttribute("org.apache.catalina.ASYNC_SUPPORTED", true); 

AsyncContext async = req.startAsync(getRequest(), getResponse());

 

posted @ 2018-07-19 14:11  Mustr  阅读(178)  评论(0编辑  收藏  举报