我正在使用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