关于MyEclipse8.5下编写的JSP文件访问SQL Server 2008的问题
//这是错误信息org.apache.jasper.JasperException:AnexceptionoccurredprocessingJSPpage/loginC...
//这是错误信息
org.apache.jasper.JasperException: An exception occurred processing JSP page /loginCheck.jsp at line 17
14:
15: //到数据库中去验证数据
16: //1.加载驱动
17: Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
18:
19: //2.建立链接
20: Connection ct = DriverManager.getConnection("jdbc:microsoft:sqlserver://127.0.0.1:1433:databaseName=ReportServer$MSSQL2010"," "," ");
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.loginCheck_jsp._jspService(loginCheck_jsp.java:119)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:169)
org.apache.jsp.loginCheck_jsp._jspService(loginCheck_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
连接数据库时出现了这种问题,我按照清华大学韩顺平的视频做的,可是在网上没有找到MSSQLSERVER.jar,MSUTIL.jar那三个包,我只好下载了sqljdbc4.jar和sqljdbc.jar这两个包,都导入项目去了,可是还是出现了上述问题,求高手指教!万分感激! 展开
org.apache.jasper.JasperException: An exception occurred processing JSP page /loginCheck.jsp at line 17
14:
15: //到数据库中去验证数据
16: //1.加载驱动
17: Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
18:
19: //2.建立链接
20: Connection ct = DriverManager.getConnection("jdbc:microsoft:sqlserver://127.0.0.1:1433:databaseName=ReportServer$MSSQL2010"," "," ");
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
javax.servlet.ServletException: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.loginCheck_jsp._jspService(loginCheck_jsp.java:119)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1516)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1361)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:128)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:66)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:169)
org.apache.jsp.loginCheck_jsp._jspService(loginCheck_jsp.java:70)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
连接数据库时出现了这种问题,我按照清华大学韩顺平的视频做的,可是在网上没有找到MSSQLSERVER.jar,MSUTIL.jar那三个包,我只好下载了sqljdbc4.jar和sqljdbc.jar这两个包,都导入项目去了,可是还是出现了上述问题,求高手指教!万分感激! 展开
4个回答
2010-05-23
展开全部
127.0.0.1:1433:databaseName=ReportServer$MSSQL2010"," "," ");
后面两个引号里的东西呢?
后面两个引号里的东西呢?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
SQL Server 2008与其的过去的老版本在驱动的名称上存在较大的差异。最好下载最新的jdbc驱动
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
用 dsm(data relationship maping)来做
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询