Ejemplo n.º 1
0
 /**
  * Ajax请求(根据学号查找学生)
  *
  * @param mapping
  * @param form
  * @param request
  * @param response
  * @return
  */
 public ActionForward findXsByXh(
     ActionMapping mapping,
     ActionForm form,
     HttpServletRequest request,
     HttpServletResponse response) {
   String xh = request.getParameter("xh");
   response.setCharacterEncoding("utf-8");
   response.setDateHeader("Expires", 0);
   response.setHeader("Cache-Control", "no-cache");
   try {
     PrintWriter out = response.getWriter();
     List list = this.getIJcffglService().findXsByXh(xh);
     String str = "";
     if (list.size() == 0) {
       out.print(0);
     } else {
       Xs0101 xs0101 = (Xs0101) list.get(0);
       str +=
           xs0101.getXm()
               + ","
               + xs0101.getZzdXb().getDmmc()
               + ","
               + xs0101.getXs0206().getBjmc()
               + ","
               + xs0101.getRxnf()
               + ","
               + xs0101.getJx01().getZymc()
               + ","
               + xs0101.getXx0301().getDwmc();
       out.println(str);
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
   return null;
 }