求html购物网站前台页面
建议: Dim xlApp As Excel.Application
JSP大作业 求一个 用HTML 做的 简单的购物网站
package ssc.web.controller; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import ssc.domain.Book; import ssc.domain.Cart; import ssc.service.BusinessService; //完成书籍购买 public class BuyServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); BusinessService service = new BusinessService(); Book book = service.findBook(id); //添加用户的购物车 Cart cart = (Cart) request.getSession().getAttribute("cart"); if (cart==null) { cart = new Cart(); request.getSession().setAttribute("cart", cart); } //把书加入到购物车,完成购买 cart.add(book); request.getRequestDispatcher("/WEB-INF/jsp/listcart.jsp").forward(request, response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); } }
这是我写的购物车