protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // 設(shè)置編碼 req.setCharacterEncoding("UTF-8"); // 接受頁面得值 String command = req.getParameter("command"); String description = req.getParameter("description"); // 想頁面?zhèn)髦? req.setAttribute("command", command); req.setAttribute("description", description); QueryService ?listService = ?new QueryService(); // 數(shù)據(jù)傳輸值 req.setAttribute("messageList", listService.queryMessageList(command, description)); // 查詢消息列表并傳值 req.getRequestDispatcher("/WEB-INF/jsp/back/list.jsp").forward(req, resp); } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {