@@ -0,0 +1,1960 @@
+package com.ust;%0A%0Aimport java.io.IOException;%0Aimport java.io.PrintWriter;%0Aimport java.util.Vector;%0A%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport javax.servlet.http.HttpSession;%0A%0A/**%0A * Servlet implementation class UserDeleteServlet%0A */%0Apublic class UserDeleteServlet extends HttpServlet %7B%0A%09private static final long serialVersionUID = 1L;%0A       %0A    /**%0A     * @see HttpServlet#HttpServlet()%0A     */%0A    public UserDeleteServlet() %7B%0A        super();%0A        // TODO Auto-generated constructor stub%0A    %7D%0A%0A%09/**%0A%09 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)%0A%09 */%0A%09protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException %7B%0A%09%09String%5B%5D ids=request.getParameterValues(%22buyList%22);%0A%09%09ProductList pl = new ProductList();%0A%09%09//calls the product class to call the database and loads the product vectors%0A%09%09pl.setVector();%0A%09%09Vector%3CInteger%3E productId = pl.productId;%0A%09%09PrintWriter pw = response.getWriter();%0A%09%09Vector vId=new Vector();%0A%09%09//The below code will pull out the existing session, else null%0A%09%09HttpSession ses=request.getSession();%0A%09%09Vector num = new Vector();%0A%09%09if(ses.getAttribute(%22username%22).equals(null))%7B%0A%09%09%09%0A%09%09%09%09response.sendRedirect(%22Login.html%22);%0A%09%09%09%0A%09%09%09%0A%09%09%7D%0A%09%09else%7B%09%0A%09%09%09%09%0A%09%09%09%09for(String id:ids)%7B%0A%09%09%09%09%09vId.add(id);%09%0A%09%09%09%09%7D%0A%09%09%09%09AddCartClass acc = new AddCartClass();%0A%09%09%09%09acc.deleteId(vId,ses.getAttribute(%22vecId%22));%0A%09%09%09%09vId=acc.productId;%0A%09%09%09%7D%0A%09%09%09%09%0A%09%09%09%09ses.setAttribute(%22vecId%22,vId);%0A%09%09%09%09pw.print(%22Item(s) has been deleted%3Cbr%3E%22);%0A%09%09%09%09pw.println(%22%3Ca href=%5C%22http://localhost:8082/OSM/LogoutServlet%5C%22%3E%3Cb%3ELogout%3C/b%3E%3C/a%3E%22);%0A%09%09%09%09pw.println(%22%3Ca href=%5C%22http://localhost:8082/OSM/ProductServlet%5C%22%3E%3Cb%3EBuy Items%3C/b%3E%3C/a%3E%22);%0A%09%09%09%09pw.println(%22%3Ca href=%5C%22http://localhost:8082/OSM/displayCartServlet%5C%22%3E%3Cb%3EView Cart%3C/b%3E%3C/a%3E%22);%0A%09%09%09%09%0A%09%09%09%0A%09%09%0A%09%7D%0A%0A%7D%0A

Create UserDeleteServlet.java