tfboys的红蜻蜓:jsp连MS SQL Sever意外
来源:百度文库 编辑:神马品牌网 时间:2024/09/03 11:55:14
javax.servlet.ServletException: com.microsoft.jdbc.sqlserver.SQLServerDriver
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.testMssql_jsp._jspService(testMssql_jsp.java:99)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
org.apache.jsp.testMssql_jsp._jspService(testMssql_jsp.java:99)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
注意两点:
1驱动文件要放在类路径上,可以放在web-inf的lib下面
(推荐统一配置tomcat数据源)
2针对xp要进行mssql升级
没有设置jdbc驱动,下载jdbc驱动包,安装之后,打开那个文件夹,你会看到三个jar包,只要把这三个jar包设置到环境变量(classpath)里就可以了,象这样
假设你安在d盘的sqldriver目录下,那么就是
d:\sqldriver\msbase.jar;d:\sqldriver\mssqlserver.jar;d:\sqldriver\msutil.jar;
什么东西