I have to return values from two modelandview methods to a single jsp `mySoftwarelist.jsp` where i have two tables. Here i have two seperate methods for returning array list
ModelAndView getLegacySuiteList()
ModelAndView getSuiteList()
i returned the arraylist `mySoftwareList`,`mySoftwareLegacyList` to the same view `swl_mySoftwareList` as
public ModelAndView getSuiteList(HttpServletRequest request, HttpServletResponse response) throws Exception
{
ArrayList mySoftwareList = new ArrayList();
try{
MySoftwareListHelper mySoftwareListHelper = new MySoftwareListHelper();
userEmailAddr =user.getEmailaddress();
mySoftwareList = mySoftwareListHelper.getSuites(userEmailAddr);
}
catch(Exception e) {
e.printStackTrace();
}
ModelAndView mnv = new ModelAndView("swl_mySoftwareList","mySoftwareList",mySoftwareList);
return mnv;
}
public ModelAndView getLegacySuiteList(HttpServletRequest request, HttpServletResponse response) throws Exception
{
ArrayList mySoftwareLegacyList = new ArrayList();
try{
MySoftwareListHelper mySoftwareListHelper = new MySoftwareListHelper();
userEmailAddr =user.getEmailaddress();
mySoftwareLegacyList = mySoftwareListHelper.getLegacySuites(userEmailAddr);
}catch(Exception e){
e.printStackTrace();
}
ModelAndView mnv = new ModelAndView("swl_mySoftwareList","mySoftwareLegacyList",mySoftwareLegacyList); 返回mnv;
}
但它只返回模型mySoftwareList
。我希望两个数组列表中的数据都用于同一个 jsp。