日期:2014-05-20  浏览次数:20757 次

jsp 连接数据库异常
在servlet里面正常,在JSP里面报错。请帮忙纠正,谢谢

引入了包


异常信息:

java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SqlServerDriver
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1438)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1284)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:125)
org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:63)
java.lang.ClassLoader.loadClassInternal(Unknown Source)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Unknown Source)
org.apache.jsp.logincl_jsp._jspService(logincl_jsp.java:75)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)


------解决方案--------------------
com.microsoft.jdbc.sqlserver.SqlServerDriver写错了!!!!com.microsoft.sqlserver.jdbc.SQLServerDriver
------解决方案--------------------
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SqlServerDriver
应该是这里啦
------解决方案--------------------
java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SqlServerDriver

到jar中找一下,是否有这个类SqlServerDriver?