老师给的后续功能,查找、点击记录后面的删除链接以后如何删除后返回列表而保留搜索结果
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
// 设置编码
request.setCharacterEncoding("UTF-8");
// 接收页面的值
String id = request.getParameter("id");
MaintainService maintainService = new MaintainService();
maintainService.deleteOne(id);
// 向页面跳转
String command = request.getParameter("command");
String description = request.getParameter("description");
request.setAttribute("command", command);
request.setAttribute("description", description);
ListService listService = new ListService();
// 查询消息列表并传给页面
request.setAttribute("messageList",listService.queryMessageList(command, description));
request.getRequestDispatcher("/List.action").forward(request, response);
}
<a></a>点击不能触发上面搜索栏的提交吧?