description The requested resource (/error.jsp) is not available.
错误提示怎么是这个?

解决方案 »

  1.   

    那个不太清楚,但是Access的话就没有这个提示了。只有MySQL下会有,所以才怀疑是不是连接MySQL数据库出了问题
      

  2.   

    你mysql启动没?? 把全部报错代码贴出来
      

  3.   

    肯定是MYSQL出问题了。仔细检查一下MYSQL。
      

  4.   

    你的mysql启动没有?另外检查一下你放文件的目录
      

  5.   

    主要是错误提示不明显,不好判断,你先确定你的mysql打开了,然后看看程序运行时,能不能找到你的jdbc连接的包,如果还不行!....再想办法!!!!!
      

  6.   

    楼主所述并能确认出错误在哪儿?详细在代码中跟踪:初始化-->数据库驱动装载-->操作数据库表-->数据传值到页面,这些过程都通过
    Exception来捕捉看(printStackTrace或保存到日志文件)。确定错误的地方后,如果解决不了,再贴上来。简单的mysql数据库jdbc连接代码。
    try {
         Class.forName("org.gjt.mm.mysql.Driver").newInstance();
         String url ="jdbc:mysql://localhost/test?user=root&password=root&useUnicode=true&characterEncoding=ISO-8859-1";     Connection conn = DriverManager.getConnection(url);
         Statement stmt = conn.createStatement();
         stmt.execute("");
         pstmt.close();     conn.close();
    } catch (Exception e) {
         e.printStackTrace();
    }
      

  7.   

    你确定你的mysql用的是3306端口?把你的sdbUrl改成
    jdbc:mysql://localhost/empinfo?user=你的用户名&password=你的密码&useUnicode=true&characterEncoding=8859_1
    试试看
      

  8.   

    HTTP Status 404 - /error.jsp
    404错误是找不到文件,是不是没有error.jsp啊,
    MYSQL连接是这样的,给你参考一下:
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    String url ="jdbc:mysql://192.168.1.102/chengxin?user=wz&password=wz123&useUnicode=true&characterEncoding=iso-8859-1"; 
    mobjConn = DriverManager.getConnection(url);
      

  9.   

    楼主的错误提示估计是因为定义了errorPage=""的缘故,当前连接数据库的jsp页出现错误后就去找你
    定义的errorPage=""那个页。现在看来是没有找到你定义的那个页面,把errorPage=""属性去掉或者检查定义的页面的路径,错误就会正常显示了!关于mysql的连接上面的兄弟们已经给出了答案!
      

  10.   

    我的数据库不在本机上,怎么调用啊??也是mysql
      

  11.   

    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    String url ="jdbc:mysql://192.168.1.102/chengxin?user=wz&password=wz123&useUnicode=true&characterEncoding=iso-8859-1"; 
    mobjConn = DriverManager.getConnection(url);
      

  12.   

    private String sdbUrl="jdbc:mysql://localhost:3306/empinfo";  //empinfo为本地ODBC数据源
    empinfo改为mysql数据库名
      

  13.   

    先去掉页中的 errorPage="error.jsp"(因为你的error.jsp不存在),看看详细错误提示。建议检查一下是否加了MYSQL驱动(JAR文件)到classpath,根据不同的MYSQL驱动选择正确的驱动名(forName...)。
      

  14.   

    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
    String url ="jdbc:mysql://主机IP/数据库名?user=用户名&password=密码&useUnicode=true&characterEncoding=iso-8859-1"; 
    mobjConn = DriverManager.getConnection(url);errorPage="error.jsp"中的error.jsp不存在。
      

  15.   

    给一个简单的例子你看一下。
    import java.sql.*;
    public class  eatjcom
    {
    public static void main(String[] args) 
    {
    try 
    {
    Class.forName("org.gjt.mm.mysql.Driver");
    }
    catch(ClassNotFoundException e)
    {
    System.out.println("ClassNotFoundException ->"+e);
    }
    try
    {
    String url="jdbc:mysql://192.168.199.100:3306/rogerchina?autoReconnect=true" ;
    String uid = "system";
    String pwd = "huang";
    Connection con = DriverManager.getConnection(url,uid,pwd);
    Statement stat=con.createStatement();
    ResultSet res=stat.executeQuery("select * from message ");
    while (res.next())
    {
    System.out.println("first column ->"+res.getString(1));
    System.out.println("second column ->"+res.getString(2));
    }
    /* if (con!=null)
    System.out.println("Connection successfull !");
    else System.out.println("Connection failure  !");  */
    }
    catch(SQLException e)
    {
    System.out.println(e);
    }
    }
    }