报这个错是什么意思啊,谢谢!!
cannot find symbol
symbol:class IOException
location:class org.apache.jsp.site2.bbs.forum_jsp
throws IOException{
       ^
Note: D:\Tomcat\work\catalina\localhost\_\org\apache\jsp\site2\bbs\forum_jsp.java uses or overrides a deprecated API.
Note:Recompile with -Xlint:deprecation for details.  
 

解决方案 »

  1.   

    IOException没有找到
    没有使用import java.io.IOException吧
      

  2.   

    代码下面:
    ------------------------------------
    <%@ page contentType="text/html;charset=gb2312" %><% String getLoginmessage = (String) session.getValue("loginSign");
       if(getLoginmessage!="OK"){
    %>
    <script language=javascript>
        window.location="refuse.jsp"
    </script>
    <% }     
    %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>论坛</title><base target="_self">
    </head>
    <body topmargin="5"><%@ page language="java" import="java.sql.*" import="java.net.*" import="java.io.*"%> 
    <%! String board; %>     
    <jsp:useBean id="workM" scope="page" class="DataBase.MyDbBean" />     
         
    <%     
    //分页的策略:每页参考行数为10行,主题数totalSub/( 总记录totalRec/参考行数PageLine) =平均每页的主题数量totalSubPerPage     
    //此后页数和第几个主题可以有一个对应关系      
    int pageLine=6;     
    int totalRec=0;     
    int totalSub=0;     
    int pageNo=1;     
         
    board = request.getParameter("board");     
    //board=session.getValue("board");     
         
    String temp = (String) session.getValue("board");     
    if(board==null) board=temp;     
         
         
    if (request.getParameter("page")!=null)     
    pageNo=Integer.parseInt(request.getParameter("page"));     
         
    try{     
    //out.print(board);     
    ResultSet countrs=null;     
    //指定参考行数     
         
    //取得总数   
    workM.OpenConn("dboard","","");  
    countrs=workM.executeQuery("select count(*) as cnt from " + board);     
    if (countrs.next())     
     totalRec=countrs.getInt("cnt");     
    countrs.close();     
    workM.closeStmt();     
    //取得主题数     
    countrs=workM.executeQuery("select count(*) as cnt from " + board + " where parent_no=0");     
    if (countrs.next())     
     totalSub=countrs.getInt("cnt");     
    countrs.close();     
    workM.closeStmt();     
         
    }     
    catch(Exception e){     
       e.printStackTrace();     
    }     
         
    //取得每行的主题数量     
    int jtemp=totalRec/pageLine+1;     
    //int totalSubPerPage=totalSub/jtemp;     
    int totalSubPerPage=10;     
    //取得总页数     
    int totalPage=0;     
    totalPage=(totalSub/totalSubPerPage * 10 + 5)/10 ;     
    %>     
    <table border="0" width="100%" cellspacing="1" cellpadding="0" bgcolor="#EEEEEE">    
      <tr>    
        <td width="60%">    
        
    <b><font color="red" size="2">论坛:<%=board%>    
    </font></b>    
        </td>    
        <td width="40%">    
          <p align="center"><font size="2"><a href="search.htm" target="_blank">检索</a>&nbsp;&nbsp; 
          <a href="forum.jsp?board=<%=board%>">刷新</a>&nbsp;&nbsp;&nbsp; <a href="addtopic.jsp?board=<%=board%>" target="rbottom">增加新帖</a>&nbsp;&nbsp;&nbsp; 
          &nbsp;<a href="myindex.jsp" target="_top">返回主页</a></font></td>          
      </tr>          
    </table>           
               
    <%           
    out.print("<table border='0' width='100%' cellspacing='1' cellpadding='0'>");           
    out.print("<tr bgcolor='#CCFFCC'><td><font size='2'>标题</font></td><td bgcolor='#CCFFCC'><font size='2'>发表人</font></td>");           
    out.print("<td bgcolor='#CCFFCC'><font size='2'>发表时间</font></td><td><font size='2'>回复数</font></td><td bgcolor='#CCFFCC'><font size='2'>点击数</font></td></tr>");           
               
    String serial;           
    String title;           
    String speaker;           
    Date providedate;           
    int reply;           
    int click;           
               
    ResultSet RS=workM.executeQuery("select * from " + board + " where parent_no=0 order by serial_no DESC");           
               
    int i=0;  //循环计数           
    while (RS.next()) {           
       i++;           
       if (i>(totalSubPerPage *(pageNo-1)) && (i<=(pageNo * totalSubPerPage))){           
     //    out.print(totalSubPerPage *(pageNo-1));           
     //    out.print(pageNo * totalSubPerPage);           
         out.print("<tr bgcolor='#f2f2e6'><td><font size='2'>");           
         serial=RS.getString("serial_no");           
         title=RS.getString("title");           
         speaker=RS.getString("speaker");           
         providedate=RS.getDate("provide_time");           
         reply=RS.getInt("reply_num");           
         click=RS.getInt("click_num");           
         showing(request,out,serial,title,speaker,providedate,reply,click,"Subject");           
               
       //这里要显示下一级的回复内容           
         ResultSet RS1 = workM.executeQuery("select * from " + board + " where parent_no=" + serial + " order by serial_no");           
         while (RS1.next()) {           
           out.print("<tr bgcolor='#f3f3e6'><td><font size='2'>");           
           serial=RS1.getString("serial_no");           
           title=RS1.getString("title");           
           speaker=RS1.getString("speaker");           
           providedate=RS1.getDate("provide_time");           
           reply=RS1.getInt("reply_num");           
           click=RS1.getInt("click_num");           
           showing(request,out,serial,title,speaker,providedate,reply,click,"Re");           
         }           
         RS1.close();           
         workM.closeStmt();           
       //------------------------           
      }           
     }            
     out.print("</table>");           
     RS.close();           
     workM.closeStmt();           
     out.print("<p><font size=2>共有发言"+ totalRec + "条,分为" + totalPage + "页显示</font><br>");  for(int j=1;j<=totalPage;j++){           
       if(j%10==0) out.print("<br>");           
       out.print("<a href=forum.jsp?board=" + board + "&page=" + j + ">");           
       if (j==pageNo)           
           out.print("<font color='red'>" + j + "</font>");           
       else           
        out.print(j);           
       out.print("</a>  ");           
    }           
    %>           
    <!--以下函数用于显示 -->         
      
    <%!           
      void showing(HttpServletRequest request,JspWriter out,String serial,String title,String speaker, Date providedate,int reply,int click,String ReSign)           
      throws IOException {           
      if(ReSign=="Subject"){           
         out.print("<a href=forumcontent.jsp?board=" + board + "&serial=" + serial + " target=rbottom>" + title + "</a>");           
      }           
      else{           
         out.print("<font color=blue>&nbsp;Re:</font><a href=forumrecontent.jsp?board=" + board + "&serial=" + serial + " target=rbottom>" + title + "</a>");           
      }           
      out.print("</font></td><td><font size='2'>");           
      out.print(speaker);           
      out.print("</font></td><td><font size='2'>");           
      out.print(providedate);           
      out.print("</font></td><td><font size='2'>");           
      out.print(reply);           
      out.print("</font></td><td><font size='2'>");           
      out.print(click);           
      out.print("</font></td></tr>");           
    }           
    %>           
    <p align="center"> </p>           
               
    </body>           
    </html> 
      

  3.   

    加了import java.io.*的。为什么?
      

  4.   

    改下第一行
    <%@ page contentType="text/html;charset=gb2312" import="java.io.*" %>
    就OK了