老師給的后續(xù)功能,查找、點(diǎn)擊記錄后面的刪除鏈接以后如何刪除后返回列表而保留搜索結(jié)果
protected void doGet(HttpServletRequest request,
?? ??? ??? ?HttpServletResponse response) throws ServletException, IOException {
?? ??? ?// 設(shè)置編碼
?? ??? ?request.setCharacterEncoding("UTF-8");
?? ??? ?// 接收頁(yè)面的值
?? ??? ?String id = request.getParameter("id");
?? ??? ?MaintainService maintainService = new MaintainService();
?? ??? ?maintainService.deleteOne(id);
?? ??? ?// 向頁(yè)面跳轉(zhuǎn)
?? ???? String command = request.getParameter("command");
?? ??? ?String description = request.getParameter("description");
?? ??? ?request.setAttribute("command", command);
?? ??? ?request.setAttribute("description", description);
?? ??? ?ListService listService = new ListService();
?? ??? ?// 查詢消息列表并傳給頁(yè)面
?? ??? ?request.setAttribute("messageList",listService.queryMessageList(command, description));
?? ???? request.getRequestDispatcher("/List.action").forward(request, response);
?? ?}
<a></a>點(diǎn)擊不能觸發(fā)上面搜索欄的提交吧?