⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bookdetails.jsp

📁 用hibernate框架实现网上书店
💻 JSP
字号:

<%@ page import="java.util.*" %>
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page session="true" %>
<html>
<head><title>TitleBookDescription</title></head>
<%@ include file="logo3.jsp" %>
<body>
    
<br>
<%
    //Get the identifier of the book to display
    String bookId = request.getParameter("bookId");
    if(bookId==null||bookId.endsWith(" "))bookId="001";
    BookDetails book = bookDB.getBookDetails(bookId);
%>

<% 
   if(book==null)
   { 
%>
    <p>书号"<%=bookId%>"在数据库中不存在<p>
    <strong><a href="<%=request.getContextPath()%>/catalog.jsp">继续购物</a></strong>
<% 
     return;
   }
%>
<table width="700" border="0" cellspacing="0" cellpadding="0" align="center">
 <tr>
                      <td width="120"  rowspan="20" align="left" valign="top"><img src="images/<%=book.getBookId()%>.jpg" width="80" height="90" border="0" ></td>
                      
                          <td><b><%=book.getTitle()%></b></td>
                      </tr>
                      <tr>
                      <td>作者&nbsp;&nbsp;:<b><%=book.getName()%></b>&nbsp;&nbsp;(<%=book.getYear()%>)</td></tr>
                      <tr>  <td>市场价:<b><%=book.getPrice()%></b>元</td></tr>
                      <tr><td>销售数量:<%=book.getSaleAmount()%></td></tr>
                      <tr><td>评论:<%=book.getDescription()%></td></tr>
                      <tr><td><center><strong><a href="<%=request.getContextPath()%>/catalog.jsp?Add=<%=bookId%>">加入购物车</a>&nbsp; &nbsp; &nbsp;
<a href="<%=request.getContextPath()%>/catalog.jsp">继续购物</a></strong></center></td></tr>
                      
 </table>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -