[求助]JSP连接数据库SQL Server2000问题
exception
javax.servlet.ServletException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket. org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) org.apache.jsp.ch9._1_jsp._jspService(_1_jsp.java:86) 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)
root cause
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket. com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source) com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source) com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source) com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Source) com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown Source) com.microsoft.jdbc.base.BaseConnection.open(Unknown Source) com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source) java.sql.DriverManager.getConnection(DriverManager.java:512) java.sql.DriverManager.getConnection(DriverManager.java:171) org.apache.jsp.ch9._1_jsp._jspService(_1_jsp.java:52) 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) 请问这是怎么回事?
我的jdk目录为C:\j2sdk1.4.2_05
tomcat目录为C:\Tomcat 5.0
数据库目录为C:\Program Files\Microsoft SQL Server
驱动目录为C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC
并把C:\Program Files\Microsoft SQL Server 2000 Driver for JDBC\lib下的三个包拷贝到了
C:\Tomcat 5.0\common\lib下,并在环境变量里的CLASSPATH下添加了这三个包
请高手帮忙