Beispiel #1
0
 /*
  * 按出书名查
  */
 public String findByBname(HttpServletRequest req, HttpServletResponse resp)
     throws ServletException, IOException, SQLException {
   int pc = getPc(req);
   String url = getUrl(req);
   String bname = req.getParameter("bname");
   PageBean<Book> pb = bookService.findByBname(bname, pc);
   pb.setUrl(url);
   req.setAttribute("pb", pb);
   return "f:/jsps/book/list.jsp";
 }
Beispiel #2
0
 /*
  * 多条件组合查询
  */
 public String findByCombination(HttpServletRequest req, HttpServletResponse resp)
     throws ServletException, IOException, SQLException {
   int pc = getPc(req);
   Book criteria = CommonUtils.toBean(req.getParameterMap(), Book.class);
   PageBean<Book> pb = bookService.findByCombination(criteria, pc);
   String url = getUrl(req);
   pb.setUrl(url);
   req.setAttribute("pb", pb);
   return "f:/jsps/book/list.jsp";
 }