这是我jar包的位置图片大家看看对不对?
http://hiphotos.baidu.com/yuqianguang313/pic/item/fd7721f1d7ca7bcbd662599bbe096b63f724a8e1.jpg
这是图片地址
丫的 这里不让显示
运行时抛这样的异常
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at oa.sys.Db.getCon(Db.java:27)
at oa.sys.Db.getStmtread(Db.java:63)
at com.login.Main.doPost(Main.java:39)
at com.login.Main.doGet(Main.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:595)
getStmtread
com.microsoft.sqlserver.jdbc.SQLServerDriver
java.lang.NullPointerException
at com.login.Main.doPost(Main.java:40)
at com.login.Main.doGet(Main.java:81)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
------解决方案--------------------------------------------------------
我不是说连接SqlServer2005要用包sqljdbc.jar,你导了五个包,第三个mssqlserver.jar是连接SqlServer2000用的,你的类路径com.microsoft.sqlserver.jdbc.SQLServerDriver在五个包里都没有吧,可以点开看。到网上下个sqljdbc.jar,导进去肯定行