zoukankan      html  css  js  c++  java
  • 银行营业网点管理系统——Servlet包(BrancheseServlet )

    package BranchesMgr.servlet;
    
    import java.io.IOException;
    import java.io.PrintWriter;
    import java.util.List;
    
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    
    import BranchesMgr.dao.BranchesDao;
    import BranchesMgr.dao.impl.BranchesDaoImpl;
    import BranchesMgr.entity.Branches;
    
    public class BrancheseServlet extends HttpServlet {
    
    	public void doGet(HttpServletRequest request, HttpServletResponse response)
    			throws ServletException, IOException {
    
    		response.setContentType("text/html;charset=utf-8");
    		PrintWriter out = response.getWriter();
    		//查询出所有网点信息
    		BranchesDao branchdao=new BranchesDaoImpl();
    		List<Branches>blist=branchdao.getBranches();
    		request.setAttribute("blist", blist);
    		request.getRequestDispatcher("index.jsp").forward(request, response);
    
    	}
    
    	public void doPost(HttpServletRequest request, HttpServletResponse response)
    			throws ServletException, IOException {
    
    		doGet(request, response);
    	}
    
    }
    

  • 相关阅读:
    JDBC_PreparedStatement
    JDBC_Statement
    JDBC连接数据库
    Oracle语句
    MySQL用户和权限
    MySQL执行计划
    MySQL创建索引
    MySQL正则表达式
    MySQLshow查询
    MySQL多表连接和分页查询
  • 原文地址:https://www.cnblogs.com/a1111/p/6540278.html
Copyright © 2011-2022 走看看