简单的网上图书书店
源代码在线查看: remove.jsp
remove.jsp
int id=Integer.parseInt(request.getParameter("id"));
LinkedList clsName=(LinkedList)session.getAttribute("lsName");
LinkedList clsType=(LinkedList)session.getAttribute("lsType");
LinkedList clsPrice=(LinkedList)session.getAttribute("lsPrice");
LinkedList clsOff=(LinkedList)session.getAttribute("lsOff");
LinkedList clsId=(LinkedList)session.getAttribute("lsId");
LinkedList clsNumber=(LinkedList)session.getAttribute("lsNumber");
LinkedList clsTotal=(LinkedList)session.getAttribute("lsTotal");
clsName.remove(id);
clsType.remove(id);
clsPrice.remove(id);
clsOff.remove(id);
clsId.remove(id);
clsNumber.remove(id);
clsTotal.remove(id);
session.setAttribute("lsName",clsName);
session.setAttribute("lsType",clsType);
session.setAttribute("lsPrice",clsPrice);
session.setAttribute("lsOff",clsOff);
session.setAttribute("lsId",clsId);
session.setAttribute("lsNumber",clsNumber);
session.setAttribute("lsTotal",clsTotal);
response.sendRedirect("../indexServlet?cmd=cart");
%>