protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { // 設置編碼 req.setCharacterEncoding("UTF-8"); // 接受頁面得值 String command = req.getParameter("command"); String description = req.getParameter("description"); // 想頁面傳值 req.setAttribute("command", command); req.setAttribute("description", description); QueryService ?listService = ?new QueryService(); // 數據傳輸值 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 {
添加回答
舉報
0/150
提交
取消