我的操作系统Red Hat8.0
      Mysql3.23.53
      apache1.3.12
      tomcat3.1.1
      jdk1.2.2
      mysql-connector-java-2.0.14.tar    
    安装后,一切都好,mysql自己登录也可以,用phpAdmin登录也正常,mysql已经启动,链接数据库的代码肯定正确,因为就几行代码,唯独jsp连接出现问题,提示如下:不知道问题出在哪里,如何解决,谢谢
Location: /tt.jsp
Internal Servlet Error:javax.servlet.ServletException: Server configuration denies access to data source
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:386)
at _0002ftt_0002ejsptt_jsp_38._jspService(_0002ftt_0002ejsptt_jsp_38.java:76)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:479)Root cause: 
java.sql.SQLException: Server configuration denies access to data source
at com.mysql.jdbc.MysqlIO.init(Unknown Source)
at com.mysql.jdbc.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.jdbc2.Connection.connectionInit(Unknown Source)
at com.mysql.jdbc.Driver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:450)
at java.sql.DriverManager.getConnection(DriverManager.java:130)
at _0002ftt_0002ejsptt_jsp_38._jspService(_0002ftt_0002ejsptt_jsp_38.java:69)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:174)
at org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:261)
at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:369)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
at java.lang.Thread.run(Thread.java:479)

解决方案 »

  1.   

    从你运行java的PC上用mysql直接连一下你的数据库,首先确定mysql能连
    == 思想重于技巧 ==
      

  2.   

       用phpAdmin连接mysql正常,就是用jsp连接出现问题,jdbc也安装好了,放在相应的位置上了,读取jdbc连接桥没报错,就是读取Connection时出现问题,不知道是什么原因呀?
      

  3.   

    你的jdbc版本与你的mysql版本match吗?看一下其readme吧。
      

  4.   

    Server configuration denies access to data source 看你的用户所对应的权限。
      

  5.   

         我的用户是 root,应该具有所有的权限,我用phpAdmin登录mysql后,看见mysql中的mysql数据表的user中的root,具有所有权限