JSP中遇到的一些问题
程序员文章站
2023-12-28 23:52:22
...
我想实现一个功能,点击下面红圈部分的各个姓名,可以跳转到该读者所对应的详细信息页面。但是实际情况是,点击之后就会出现第二个页面。
问题正在排查中,如果解决了,我会回来更新这篇博客。有想法的朋友也可以留言沟通。
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@ page import="com.dao.BorrowDAO" %>
<%@ page import="com.actionForm.BorrowForm" %>
<%@ page import="java.util.*"%>
<html>
<%
Collection coll=(Collection)request.getAttribute("Bremind");
%>
<head>
<title>图书馆管理系统</title>
<link href="CSS/style.css" rel="stylesheet">
</head>
<body onLoad="clockon(bgclock)">
<%@include file="banner.jsp"%>
<%@include file="navigation.jsp"%>
<table width="778" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td valign="top" bgcolor="#FFFFFF"><table width="99%" height="510" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableBorder_gray">
<tr>
<td height="510" valign="top" style="padding:5px;"><table width="98%" height="487" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="22" valign="top" class="word_orange">当前位置:系统查询 > 借阅到期提醒 >>></td>
</tr>
<tr>
<td align="center" valign="top"><%
if(coll==null || coll.isEmpty()){
%>
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="36" align="center">暂无到期提醒信息!</td>
</tr>
</table>
<%
}else{
//通过迭代方式显示数据
Iterator it=coll.iterator();
int ID=0;
String bookname="";
String bookbarcode="";
String readerbar="";
String readername="";
String borrowTime="";
String backTime="";
%>
<table width="98%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF" bordercolordark="#a4c2f4" bordercolorlight="#FFFFFF">
<tr align="center" bgcolor="#e3F4F7">
<td width="15%" bgcolor="#a4c2f4">图书条形码</td>
<td width="28%" bgcolor="#a4c2f4">图书名称</td>
<td width="17%" bgcolor="#a4c2f4">借阅证号</td>
<td width="9%" bgcolor="#a4c2f4">读者名称</td>
<td width="15%" bgcolor="#a4c2f4">借阅时间</td>
<td width="16%" bgcolor="#a4c2f4">应还时间</td>
</tr>
<%
while(it.hasNext()){
BorrowForm borrowForm=(BorrowForm)it.next();
bookname=chStr.toChinese(borrowForm.getBookName());
bookbarcode=borrowForm.getBookBarcode();
readerbar=chStr.toChinese(borrowForm.getReaderBarcode());
readername=chStr.toChinese(borrowForm.getReaderName());
borrowTime=borrowForm.getBorrowTime();
backTime=borrowForm.getBackTime();
%>
<tr>
<td style="padding:5px;"> <%=bookbarcode%></td>
<td style="padding:5px;"> <%=bookname%></td>
<td style="padding:5px;"> <%=readerbar%></td>
<td style="padding:5px;"><a href="borrow.do?action=readerDetail&ID=<%=ID%>"><%=readername%></a></td>
<td style="padding:5px;"> <%=borrowTime%></td>
<td style="padding:5px;"> <%=backTime%></td>
</tr>
<%
}
}
%>
</table></td>
</tr>
</table>
</td>
</tr>
</table><%@ include file="copyright.jsp"%></td>
</tr>
</table>
</body>
</html>