看看,能不能帮你:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
详细内容 <%
List
list=(List)session.getAttribute("list");
int size=list.size();
int bookId=Integer.parseInt(request.getParameter("bookid"));
BookBean book=null;
int i=0;
while(i book=list.get(i);
if(bookId==book.getBookId())
{
session.setAttribute("bookToAdd",book);
break;
}
i++;
}
%>
书名;<%=book.getBookName() %>
价格:<%=book.getPrice() %>
描述:<%=book.getDescription() %>