gaocheck.jsp

来自「用hibernate框架实现网上书店」· JSP 代码 · 共 61 行

JSP
61
字号
<%@page pageEncoding="UTF-8"%><%@page session="true" %><html>    <head>        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">           </head>    <body>        <%@ include file="logo3.jsp" %>         <%         response.setContentType("text/html;charset=GB2312");         request.setCharacterEncoding("GB2312");         String booktitle=(String)request.getParameter("btitle");         String bookname=(String)request.getParameter("bname");         String bookyear=(String)request.getParameter("byear");              BookDetails condition = new BookDetails();					condition.setTitle(booktitle);		condition.setName(bookname);                condition.setYear(Integer.parseInt(bookyear));		java.util.List list =bookDB.searchgao(condition);                java.util.Iterator it = list.iterator();                if(it.hasNext())                    {		while(it.hasNext())                {			BookDetails e = (BookDetails)it.next();			                %>              <table width="800" border="0" cellspacing="0" cellpadding="0" align="center"> <tr>     <td width="120"  rowspan="10" align="left" valign="top"><a href="<%=request.getContextPath()%>/bookdetails.jsp?bookId=<%=e.getBookId()%>"><img src="images/<%=e.getBookId()%>.jpg" width="80" height="90" border="0" ></a></td>                                            <td><a href="<%=request.getContextPath()%>/bookdetails.jsp?bookId=<%=e.getBookId()%>"><b><%=e.getTitle()%></b></a></td>                      </tr>                      <tr>                      <td>作者&nbsp;&nbsp;:<b><%=e.getName()%></b></td></tr>                      <tr>  <td>市场价:<b><%=e.getPrice()%></b>元</td></tr>                     <tr><td>&nbsp;</td></tr>                      <tr> <td><strong><a href="<%=request.getContextPath()%>/catalog.jsp?Add=<%=e.getBookId()%>">加入购物车</a></strong>&nbsp; &nbsp; &nbsp;</td></tr>                       </table>  <br>     <br> <%  }   }    else  { %>   <%="很抱歉,没有搜索到您要的内容"%> <% }  %>                 </body></html>

⌨️ 快捷键说明

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