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

看一个JSP中显示的错误
org.apache.jasper.JasperException:   com.microsoft.JDBC.sqlserver.SQLServerDriver
at   org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at   javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at   org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at   org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at   org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at   org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at   org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at   org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at   org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at   org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at   org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at   org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at   org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at   org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at   org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at   org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at   org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at   org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at   org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at   org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at   org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at   org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at   org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at   org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at   org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at   org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
at   org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at   org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
at   org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:530)
at   java.lang.Thread.run(Thread.java:536)

什么意思?

------解决方案--------------------
你的代码正确的,
<%Class.forName( "com.microsoft.JDBC.sqlserver.SQLServerDriver ");
改成
<%Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver ");

因为 JAVA 是对大小写敏感的,改了肯定正确