当前位置: 技术问答>java相关
帮我看一下为什么数据库连接不上!
来源: 互联网 发布时间:2017-04-22
本文导语: connectdb.jsp程序如下: Linux-JSP-JDBC-MySQL测试 - Select 姓名 年龄 错误提示: type Exception report message Internal Server Error description The server encountered an internal error (Interna...
connectdb.jsp程序如下:
Linux-JSP-JDBC-MySQL测试 - Select
姓名
年龄
错误提示:
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org.gjt.mm.mysql.Driver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
at org.apache.jsp.connectdb$jsp._jspService(connectdb$jsp.java:151)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
麻烦高手给指点一下:
Linux-JSP-JDBC-MySQL测试 - Select
姓名
年龄
错误提示:
type Exception report
message Internal Server Error
description The server encountered an internal error (Internal Server Error) that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org.gjt.mm.mysql.Driver
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:463)
at org.apache.jsp.connectdb$jsp._jspService(connectdb$jsp.java:151)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
麻烦高手给指点一下:
|
Class.forName("org.gjt.mm.mysql.Driver").newInstance();
等数据库操作语句放在try{}catch{}中试下
等数据库操作语句放在try{}catch{}中试下