Exemple #1
0
 public String load(HttpServletRequest req, HttpServletResponse resp)
     throws ServletException, IOException, SQLException {
   String bid = req.getParameter("bid");
   Book book = bookService.load(bid);
   req.setAttribute("book", book);
   return "f:/jsps/book/desc.jsp";
 }
Exemple #2
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";
 }
Exemple #3
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";
 }