/** * 根据班级查找学生 * * @param mapping * @param form * @param request * @param response * @return */ public ActionForward findStuByBj( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { String bjbh = request.getParameter("bjbh"); List list = this.getIJcffglService().findStuByBj(bjbh); response.setCharacterEncoding("utf-8"); response.setDateHeader("Expires", 0); response.setHeader("Cache-Control", "no-cache"); String str = ""; try { PrintWriter out = response.getWriter(); for (int i = 0; i < list.size(); i++) { Xs0101 xs0101 = (Xs0101) list.get(i); str += xs0101.getXsbh() + "," + xs0101.getXm() + "#"; } out.println(str); out.flush(); out.close(); } catch (Exception e) { e.printStackTrace(); } return null; }