首页>代码>原生java servlet开发企业门户网站 (包含前后端)>/mhwz/src/main/java/com/mingrisoft/servlet/admin/AdminUserServlet.java
package com.mingrisoft.servlet.admin; import java.io.IOException; import java.util.List; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.mingrisoft.utils.C3poUtils; /** * Created by huangzf on 2018/11/19 */ @WebServlet("/admin/adminUser") public class AdminUserServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { String sql = "select * from admin"; List<Map<String,Object>> list = C3poUtils.getList(sql); req.setAttribute("list",list); req.getRequestDispatcher("/WEB-INF/admin/adminUser.jsp").forward(req,resp); } }