jsp连接sql server2000 出错,错误页面如下

来源:百度知道 编辑:UC知道 时间:2024/06/08 05:19:56
type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: Exception in JSP: /test.jsp:10

7: //pubs为你的数据库的
8: String user="sa";
9: String password="";
10: Connection conn= DriverManager.getConnection(url,user,password);
11: Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
12: String sql="select * from test";
13: ResultSet rs=stmt.executeQuery(sql);

Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:451)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
org.apache.jasper.servlet.JspServlet.service(JspServlet.ja

如果是xp系统,你必须打sql的sp4补丁才行

1 首先要定位你的sqlserver 是否打了sp3的补丁 目前支持sp3 或高或低都不可以2:需要检查下,你的sqlserver补丁是否正确加载,放在工程lib下不行,可以尝试放到tomcat的lib目录下。