<%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%><%--导入JSTL标签库 --%> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>${TYPE}</title> <link rel="stylesheet" type="text/css" href="Books.css"/> </head> <body> <div name="title"> <table align="center"> <tr> <td colspan="4"><img id="logo" src="image/logo.png"/></td> <td colspan="4"><h1>图书你的神话</h1></td> <td><a href="login.jsp"><input type="submit" value="登录" class="submit"/></a></td> <td><a href="NewUser.jsp"><input type="submit" value="注册" class="submit"/></a></td> </tr> </table> </div> <div> <table align="center"> <c:choose> <c:when test="${BOOKS!=null}"><%--指定类型图书列表存在 --%> <c:forEach var="b" items="${BOOKS}" varStatus="status"><%--遍历指定类型图书列表 --%> <c:if test="${status.index%2==0}"> <tr> <td> <li><img height="150px" width="150px" src="${b.getBimage()}" /></li> <li>${b.getBname()}</li> <li>¥${b.getPrice()}</li> </td> </tr> </c:if> <c:if test="${status.index%2!=0}"> <td> <li><img height="150px" width="150px" src="${b.getBimage()}" /></li> <li>${b.getBname()}</li> <li>¥${b.getPrice()}</li> </td> </c:if> </c:forEach> </c:when> <c:otherwise><%--指定类型图书列表不存在 --%> <tr><td>对不起,指定类型图书不存在!</td></tr> </c:otherwise> </c:choose> <tr> <td width="100%" align="center"><a href="#" >下一页</a> <a href="#">末页</a></td> </tr> </table> </div> <div id="end"> <hr color="#993300"/> <p align="center">版权所有©工作室</p> <p align="center">手机版下载:<a href="#">Android</a>|<a href="#">Iphone</a></p> <p align="center">联系我们:1383838438</p> </div> </body> </html>
看风听雨雪
相关分类