在數據庫的Class.forName,conn,stmt,rs的創建中加上異常扑獲,就可以分析到原因了
例如
try{
     Connection con=DriverManager.getConnection(url);
}catch(Exception e){
     out.println(e.getMessage());
}

解决方案 »

  1.   

    <%
    String url=new String();url="jdbc:odbc:hjfDB";try
    {Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");Connection con=DriverManager.getConnection(url);Statement stmt=con.createStatement();String SQL=new String();
    SQL="select * from vodcontent order by filmtype";ResultSet rs=stmt.executeQuery(SQL);
    rs.close(); stmt.close();con.close();

    }catch(Exception e)
    {
      System.out.print(e.getMessage());
    }
    %>
      

  2.   

    try:http://expert.csdn.net/Expert/topic/670/670716.xml?temp=.9481317
      

  3.   

    可能是与数据库有关,加上
    try{
         ResultSet rs=stmt.executeQuery(SQL);}
    catch(Exception e){
         out.println(e.getMessage());
    }
    试试,看有没有错误提示