| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2663 人关注过本帖
标题:求解决,jsp连接数据库报错
取消只看楼主 加入收藏
yh612510
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2015-5-7
收藏
 问题点数:0 回复次数:0 
求解决,jsp连接数据库报错
HTTP Status 500 - An exception occurred processing JSP page /index.jsp at line 63

type Exception report

message An exception occurred processing JSP page /index.jsp at line 63

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 /index.jsp at line 63

60:          String password = "sa";  
61:          String url="jdbc:sqlserver://localhost:1433;DatabaseName="+dateBaseName;
62:         
63:          Connection conn=DriverManager.getConnection(url,username,password);   
64:         
65:          System.out.println("鏁版嵁搴撹繛鎺�锛�);  
66:     


Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:567)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:454)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

javax.servlet.ServletException: java.sql.SQLException: No suitable driver found for jdbc:sqlserver://localhost:1433;DatabaseName=School
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:908)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:837)
    org.apache.jsp.index_jsp._jspService(index_jsp.java:176)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

[ 本帖最后由 yh612510 于 2015-5-7 14:02 编辑 ]
搜索更多相关主题的帖子: occurred password sqlserver 连接数据库 localhost 
2015-05-07 14:00
快速回复:求解决,jsp连接数据库报错
数据加载中...
 
   



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

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