请大家帮忙看看下面代码,只能显示第一页,但是不能显示下一页的内容.看看代码应该怎么改呢? 谢谢!<TD class=style2 align=left> <SPAN
                  class=style4>&gt;&gt;</SPAN> <SPAN class=style3><%String strMotif=request.getParameter("strMotif");
                  out.print(getHomePageData.getAreaTitle(strMotif, session));%>
                  </SPAN></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
                   <% co_Dao tempDao =  co_BeanFactory.getDao();
                    String table=request.getParameter("table");
                    String strBID=request.getParameter("BID");
                    String appcatlog=request.getParameter("appcatlog");
                  int  countpage=0;
                  SqlRowSet rows1=tempDao.ExcuteQuery("select count(*) from " +table+" a,AppWorkFlow b where a.APPSEQ=B.APPSEQ  AND WFSTATE=0 and appcatlog="+appcatlog );
                  rows1.next();
                  int page_record=4;
                  int rowscount=rows1.getInt(1);
                  countpage=(rowscount+page_record-1)/page_record;
                  int curpage=Integer.parseInt(request.getParameter("page"));
                   if(curpage==1){
                   String strSql=co_JdbcUtil.getConfigSql("SQL_SMT_023",
                            new String[]{table,appcatlog,Integer.toString(page_record+1)});
                  SqlRowSet rows = tempDao.ExcuteQuery(strSql);             for (int i = 0; rows.next(); i++)
        {
     //   Map map = (Map) rows.get(i);
        String AppSubject =rows.getString("AppSubject");
        String AppMemo = rows.getString("AppMemo");
        String AppShowDate =rows.getString("AppShowDate");
        String AppDate=AppShowDate.substring(0, 10);
        String strID=rows.getString("AppSEQ");
         String strURL = "http://" + request.getServerName() + ":" + request.getServerPort() + "/EIIMSWeb/frmGatewayDetail.jsp?BID="+strBID+"&strID="+strID+"&table="+table+"&appcatlog="+appcatlog;
        %>
        <TABLE cellSpacing=5 cellPadding=0 width=568 border=0>
          <TBODY>
            <TR>
              <TD align=right width=39><IMG height=7
                src="co_ViewElem/images/home/new03.gif" width=14></TD>
                <TD width=549><A href="<%=strURL%>"
                  target=_blank><%=AppSubject%></A> <SPAN class=style10>(
                      <%=AppDate%> ) </SPAN></TD></TR></TBODY></TABLE>
                      <% }}
                      else{
                        String strSql=co_JdbcUtil.getConfigSql("SQL_SMT_024",
                            new String[]{table,appcatlog,String.valueOf( page_record+1),table,appcatlog,String.valueOf( ((curpage-1)*page_record)+1) });
                      SqlRowSet rows = tempDao.ExcuteQuery(strSql);
        for (int i = 0; rows.next(); i++)
        {
       //   Map map = (Map) rows.get(i);
        String AppSubject =rows.getString("AppSubject");
        String AppMemo = rows.getString("AppMemo");
        String AppShowDate =rows.getString("AppShowDate");
        String AppDate=AppShowDate.substring(0, 10);
        String strID=rows.getString("AppSEQ");
         String strURL = "http://" + request.getServerName() + ":" + request.getServerPort() + "/EIIMSWeb/frmGatewayDetail.jsp?BID="+strBID+"&strID="+strID+"&table="+table+"&appcatlog="+appcatlog;
        %>
        <TABLE cellSpacing=5 cellPadding=0 width=568 border=0>
          <TBODY>
            <TR>
              <TD align=right width=39><IMG height=7
                src="co_ViewElem/images/home/new03.gif" width=14></TD>
                <TD width=549><A href="<%=strURL%>"
                  target=_blank></A><A href="<%=strURL%>" target=_blank><%=AppSubject%></A> <SPAN class=style10>( <%=AppDate%> ) </SPAN></TD></TR></TBODY></TABLE>
                      <% }
                      }%>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD><IMG height=3 src="co_ViewElem/images/home/new01.gif" width=533></TD></TR></TBODY></TABLE><BR>
      <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR>
          <TD align=center height=29>
            <TABLE cellSpacing=0 cellPadding=4 width="100%">
              <TBODY>
              <TR>
                <TD><IMG height=1 src="" width=510></TD></TR></TBODY></TABLE>
            <TABLE cellSpacing=0 cellPadding=2 width="90%" border=0>
              <form name="form1" action=frmGatewayList.jsp method=post onsubmit="return testform();">
                <input type="hidden" name="table" value="<%=table%>" >
                <input type="hidden" name="strMotif" value="<%=strMotif%>">             
                <input type="hidden" name="countpage" value="<%=countpage%>">
              <TBODY>
              <TR>                <TD align="center"><A href="frmGatewayList.jsp?table=<%=table%>&strMotif=<%=strMotif%>&appcatlog=<%=appcatlog%>&page=<%=curpage-1%>"><%if(curpage!=1){out.print("上一页");}%></A>
                  <A href="frmGatewayList.jsp?table=<%=table%>&strMotif=<%=strMotif%>&appcatlog=<%=appcatlog%>&page=<%=curpage+1%>"><%if(curpage<countpage){out.print("下一页");}%></A>
                  共<%=countpage%>页 <%=page_record%>个/页 目前第<%=curpage%>页
                 <span class="a" > 转到第 <input name="page" type="text" size="2"> 页 </span><A style="cursor:hand;" href="javascript:testform();"><span class="a">GO</span></A></TD></TR></form></TBODY></TABLE></TD></TR></TBODY></TABLE>