各位,请帮我看看这个分页显示的页面,不能跳转,在线等待,谢谢
<%@ page contentType= "text/html;charset=GBK " %>
<%@ page language= "java " import= "java.sql.* "%>
<%@ page import= "java.lang.Math.* " %>
<jsp:useBean id= "conn " scope= "page " class= "test.ConnSQL "/>
<%!
ResultSet rs = null;
ResultSet rsTmp = null;
String sql = " ";
int PageSize = 30;
int Page = 3;
int totalPage = 1;
String str = " ";
%>
<%!
public String ShowOnePage(ResultSet rs, int Page, int PageSize) {
str = " ";
// 先将记录指针定位到相应的位置
try {
rs.absolute( (Page-1) * PageSize + 1);
}catch(
SQLException e) {
}
for(int iPage=1; iPage <=PageSize; iPage++) {
str += RsToGbook(rs );
try {
if(!rs.next()) break;
}catch(Exception e) {}
}
return str;
}
// 显示单行记录子模块
public String RsToGbook( ResultSet rs ) {
String tt = " ";
try {
tt += " <TR> ";
tt += " <TD> " + rs.getString( "Trans_Name ") + " </TD> ";
tt += " <TD> " + rs.getString( "dst_termid ") + " </TD> ";
tt += " <TD> " + rs.getString( "src_termid ") + " </TD> ";
tt += " <TD> " + rs.getString( "msg_content ") + " </TD> ";
tt += " </TR> ";
}catch(SQLException e) {}
return tt;
}
%>
<% String begintime=request.getParameter( "beginDate ");
String endtime=request.getParameter( "endDate ");
sql = "select * from Teci_chat_mt where insert_time between ' "+begintime+ " ' "+ "and ' "+endtime+ " ' ";
try {
rs = conn.executeQuery( sql );
}catch(Exception e) {
out.println( "访问数据库出错! ");
}
%>
<html>
<head>
<tit