我正在使用Spring MVC异步处理,但控制器不返回Web浏览器上的视图。弹簧异步处理不返回到视图
@RequestMapping(value = "/generateGM", method = RequestMethod.POST)
public Callable<ModelAndView> generateGMReport(@RequestParam("countryCode") int countryCode, ModelAndView mv) {
Callable<ModelAndView> c = new GenericCallable(countryCode, reportDao, mv);
return c;
}
@Override
public ModelAndView call() throws Exception {
List<CostReport> gmList = reportDao.generateGrossMarginReport(countryCode);
mv.setViewName("gmReport");
mv.addObject("gmList", gmList);
return mv;
}
我试图修改代码来返回Callable,但它仍然不会返回到指定的视图名称。
我正在使用JBoss 7.1。
有部署时警告:
WARN [org.jboss.as.ee] (MSC service thread 1-7)
JBAS011006: Not installing optional component
org.springframework.web.context.request.async.StandardServletAsyncWebRequest
due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS011054:
Could not find default constructor for class
org.springframework.web.context.request.async.StandardServletAsyncWebRequest
原因:也许SiteMesh的不能从Spring MVC框架(AsynContext)设置的响应对象。
的原因是什么?
请帮忙。
谢谢。
请提供任何指导。请让我知道是否需要进一步的信息。 – peterwkc 2013-03-14 01:43:22
我试图禁用sitemesh文件管理器,它已经返回了一些结果,但是没有使用sitemesh fileter enable返回html。此外,还有警告[org.jboss.as.ee](MSC服务线程1-7) JBAS011006:不安装可选组件 org.springframework.web.context.request.async.StandardServletAsyncWebRequest 由于异常: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: 无法找到类 的默认构造函数org.springframework.web.context.request.async.StandardServletAsyncWebRequest – peterwkc 2013-03-14 04:45:27