Package com.lei.dao

Examples of com.lei.dao.ProductDao.findAll()


  private void all(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
   
    HttpSession session=request.getSession();
    ProductDao dao=new ProductDao();
    List<Product> list=dao.findAll();
    session.setAttribute("prolist", list);
    request.getRequestDispatcher("main.jsp").forward(request, response);
   
  }
View Full Code Here


    pro.setName(name);
    pro.setPrice(price);
    pro.setShangjia(true);
    pd.save(pro);
   
    List<Product> list=pd.findAll();
   
    PrintWriter out=response.getWriter();
    out.print("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    out.print("<product>");
    for(Product p:list){
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.