首页 > 其他分享 >删除选中功能代码实现

删除选中功能代码实现

时间:2022-08-20 10:24:05浏览次数:66  
标签:删除 代码 req HttpServletResponse id 选中 resp

删除选中功能代码实现


public class DelUserServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//获取id
String id = req.getParameter("id");
//调用Service删除
UserService service = new UserServiceImpl();
service.deleteUser(id);

//跳转到查询所有Servlet
resp.sendRedirect(req.getContextPath()+"/UserListServlet");
}

@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
doGet(req, resp);
}
}

 

标签:删除,代码,req,HttpServletResponse,id,选中,resp
From: https://www.cnblogs.com/ssr1/p/16607233.html

相关文章