<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="java.util.*" %>
<%@ page import="shop.*"%>
<html>
<jsp:useBean id="car1" class="shop.Car" scope="session" >
</jsp:useBean>
<body>
<%String str[]= request.getParameterValues("book");
if(str!=null){
for(int i=0;i<str.length;i++)
car1.delete(str[i]);
}
else str=new String[2];
String strbook=null;
String booknum=null;
for(int n=0;n<car1.length();n++){
strbook=car1.getBook(n).getBooknum();
booknum=request.getParameter(strbook);
if(booknum==null)booknum="";
int num=Integer.parseInt(booknum);
car1.modify(strbook,num);
}%>
<jsp:forward page="car.jsp"></jsp:forward>
</body>
</html>