标题:mysql与tomcat连接中遇到的问题
取消只看楼主
lulu820830
Rank: 1
等 级:新手上路
帖 子:11
专家分:0
注 册:2008-3-24
 问题点数:0 回复次数:0 
mysql与tomcat连接中遇到的问题
我刚开始学JSP,从别人那里弄来个源程序,服务器用的是tomcat6.16,数据库用的是mysql5.0,开始不知道怎样连接,后来从网上查了些资料,用JDBC5.08连接,但是弄了几天就是打不开,浏览器上显示如下,麻烦高手指点一下
HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /corrision/conn/conn.jsp at line 14

11: String dbUrl="jdbc:mysql://localhost:3306/OA?useUnicode=true&characterEncoding=GBK";
12: String dbUser="root";
13: String dbPwd="123456";
14: con=java.sql.DriverManager.getConnection(dbUrl,dbUser,dbPwd);
15: stmt=con.createStatement();
16: %>


Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:505)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:398)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)


root cause

javax.servlet.ServletException: com.mysql. Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **
搜索更多相关主题的帖子: mysql tomcat jsp HTTP Status 500 - 
2008-08-20 15:01



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-229172-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.213629 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved