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
ます。両方のarraylistのデータを同じjspで使用したい。