我在运行locRecords.jsp
时遇到以下错误在第268行处理JSP页面/locRecords.jsp时发生异常
<td><%=rs.getString("LOC_ID")%></td>
<td><%=rs.getString("LOC_NAME")%></td>
<td><%=rs.getString("LOC_CONTACT")%></td>
<td><%=rs.getString("LOC_ADDRESS")%></td>
<%if (rs.getString("BELONGED_TO") != null){%>
<td><%=rs.getString("BELONGED_TO")%></td>
javax.servlet.ServletException:java.sql.SQLException:列名无效 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:911) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:840) org.apache.jsp.locRecords_jsp._jspService(locRecords_jsp.java:432) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) javax.servlet.http.HttpServlet.service(HttpServlet.java:722) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334) javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
答案 0 :(得分:0)
我认为您使用的列名与您在数据库中使用的关系(表)不同。请检查列名和rs.getString()的参数。