java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]无效的描述符索引,总是提示这个错误
org.apache.jasper.JasperException:AnexceptionoccurredprocessingJSPpage/authorize.jspa...
org.apache.jasper.JasperException: An exception occurred processing JSP page /authorize.jsp at line 53
50: out.print(rs.getString("user_truename")+"----"+rs.getString("user_email"));
51:
52: %>
53: <a href="authorize.jsp?action=authorize&userid=<%=rs.getInt("user_id")%>">批准</a>|||<a href="abandon.jsp??action=aabandon&userid=<%=rs.getInt("user_id") %>">删除</a>
54: <%
55: out.print("<br>");
56: }
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root causejavax.servlet.ServletException: java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]无效的描述符索引
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)
org.apache.jsp.authorize_jsp._jspService(authorize_jsp.java:244)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
oot cause java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]无效的描述符索引
sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(Unknown Source)
sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(Unknown Source)
sun.jdbc.odbc.JdbcOdbcResultSet.getInt(Unknown Source)
sun.jdbc.odbc.JdbcOdbcResultSet.getInt(Unknown Source)
org.apache.jsp.authorize_jsp._jspService(authorize_jsp.java:197)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 展开
50: out.print(rs.getString("user_truename")+"----"+rs.getString("user_email"));
51:
52: %>
53: <a href="authorize.jsp?action=authorize&userid=<%=rs.getInt("user_id")%>">批准</a>|||<a href="abandon.jsp??action=aabandon&userid=<%=rs.getInt("user_id") %>">删除</a>
54: <%
55: out.print("<br>");
56: }
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:521)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:412)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root causejavax.servlet.ServletException: java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]无效的描述符索引
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:865)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:794)
org.apache.jsp.authorize_jsp._jspService(authorize_jsp.java:244)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
oot cause java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]无效的描述符索引
sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(Unknown Source)
sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(Unknown Source)
sun.jdbc.odbc.JdbcOdbcResultSet.getInt(Unknown Source)
sun.jdbc.odbc.JdbcOdbcResultSet.getInt(Unknown Source)
org.apache.jsp.authorize_jsp._jspService(authorize_jsp.java:197)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 展开
5个回答
展开全部
肯定是你jdbc的连接描述写的不正确
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
53: <a href="authorize.jsp?action=authorize&userid=<%=rs.getInt("user_id")%>">批准</a>|||<a href="abandon.jsp??action=aabandon&userid=<%=rs.getInt("user_id") %>">删除</a>
最好看一下字段有没有写错, 再说你这个 href="abandon.jsp??action 这里多了一个 问号
最好看一下字段有没有写错, 再说你这个 href="abandon.jsp??action 这里多了一个 问号
追问
问号去掉还是提示同样的错误
追答
你先把这个打印出来看有数据么
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
: out.print(rs.getString("user_truename")+"----"+rs.getString("user_email"));
上面的字段名是不是写错了?
上面的字段名是不是写错了?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<%=rs.getInt("user_id")%> 没有user_id 这个字段. 你可以输出一下rs.getInt("user_id")
追问
user_id这个字段数据表中是有的,而且是第一个字段,我把这个字段改为1即还是提示这个错误
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询