servlet中的代码
public void showBookInfo(HttpServletRequest request,HttpServletResponse response) throws UnsupportedEncodingException{
request.setCharacterEncoding("utf-8");
String bid = request.getParameter("bid");
BookService service = new BookService();
Book book = service.showBookInfo(bid);
try {
request.getSession().setAttribute("bookinfo", book);
response.sendRedirect(request.getContextPath()+"/product_info.jsp");
return;
} catch (Exception e) {
e.printStackTrace();
}
}这只product_info.jsp页面的代码<table cellspacing="0" class="infocontent">
<tr>
<td><img src="ad/page_ad.jpg" width="645" height="84" /> <table width="100%%" border="0" cellspacing="0">
<tr>
<td width="30%"> <div class="divbookcover">
<p>
<img src="${bookinfo.image }"
width="213" height="269" border="0" />
</p>
</div> <div style="text-align:center; margin-top:25px">
<a href="cart.jsp">
<img src="images/buybutton.gif" border="0" /> 
</a>
</div></td>
<td style="padding:20px 5px 5px 5px"><img
src="images/miniicon3.gif" width="16" height="13" /><font
class="bookname">&nbsp;&nbsp;${bookinfo.bname }</font> <hr />售价:<font color="#FF0000">¥${bookinfo.price }</font>
<hr /> 类别:${bookinfo.category.cname} <hr />
<p>
<b>图书作者:</b>
</p> ${bookinfo.author }</td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>