做了一个删除订单jsp,蛋不知道为什么会报这样的错,在纠结啊。。。。
删除订单jsp如下:<%@ page contentType="text/html;charset=gb2312" %>
<%@ page import="shopBeans.ConnDB" %>
<%@ page import="java.sql.*" %>
<html>
<head>
<title>Easy Buy Online</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body>
<%
String o_id=(String) request.getParameter("order_id");
if(o_id=="" || o_id==null)
{
out.println("<script language='javascript'>alert('请先购买商品!');window.location.href='index_.jsp';</script>");
}
else
{
ConnDB conn=new ConnDB();
String sql="delete from Orders where order_id='"+o_id+"'";
ResultSet rs= conn.doQuery(sql);
String sql1="delete from OrderDetails where order_id='"+o_id+"'";
ResultSet rs1 = conn.doQuery(sql1);
if(rs.next()&&rs1.next())
{
out.println("<script language=javascript> alert('ok');</script>");
response.sendRedirect("my_order.jsp");
}
else
{
out.println("order_null.jsp");
}
}
%>
</body>
</html>
报错信息如下:
org.apache.jasper.JasperException: An exception occurred processing JSP page /shop/del_order.jsp at line 23
20: String sql1="delete from OrderDetails where order_id='"+o_id+"'";
21: ResultSet rs1 = conn.doQuery(sql1);
22:
23: if(rs.next()&&rs1.next())
24: {
25: out.println("<script language=javascript> alert('ok');</script>");
26: response.sendRedirect("my_order.jsp");