public ActionForward getlist(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception { EmpForm empForm = (EmpForm) form; List ff = empService.deptList();
request.setAttribute("deptlist", ff);
String number = ResourceBundle.getBundle("ApplicationResources")
.getString("searchCenter.keywords.minLength");
System.out.println(number); List gg = empService.empList();
request.setAttribute("emplist", gg);
return mapping.findForward("welcome");
}java注释exceptionlist
HttpServletRequest request, HttpServletResponse response)
throws Exception { EmpForm empForm = (EmpForm) form; List ff = empService.deptList();
request.setAttribute("deptlist", ff);
String number = ResourceBundle.getBundle("ApplicationResources")
.getString("searchCenter.keywords.minLength");
System.out.println(number); List gg = empService.empList();
request.setAttribute("emplist", gg);
return mapping.findForward("welcome");
}java注释exceptionlist
public ActionForward getlist(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
//实体类EmpForm接收从页面提交的form
EmpForm empForm = (EmpForm) form;//调用empService对象里面的deptList()方法,返回的是list类型,用list接收
List ff = empService.deptList();
//将获取到的list集合放入request保存
request.setAttribute("deptlist", ff);
//获取国际化properties文件的值,不知道干嘛用
String number = ResourceBundle.getBundle("ApplicationResources")
.getString("searchCenter.keywords.minLength");
//打印获取的number的值
System.out.println(number);//又一次调用empService对象里面的deptList()方法
List gg = empService.empList();
//又一次放进request里面
request.setAttribute("emplist", gg);
//返回welcome,可以在struts-config.xml中找到<forward name="welcome" path="/跳转的页面">
return mapping.findForward("welcome");
}