我以删除功能为例,就是最后我都会转到providerAdmin.jsp页面,但是就会报下面这个错,刷新一下就好了,而且数据库是没有任何问题的。
附providerAdmin.jsp的代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Insert title here</title>
<link type="text/css" rel="stylesheet" href="css/style.css">
<script type="text/javascript">
function doit(flag,id)
{
if(flag=="del")
{
if(confirm("确认删除吗?")!=true)
return;
}
window.location = "provider.do?id="+id+"&flag="+flag;
}
</script>
</head>
<body>
<div class="menu">
<table>
<tbody><tr><td><form method="post" action="">
<input name="flag" value="search" type="hidden">
供应商名称:<input name="providerName" class="input-text" type="text"> 供应商描述:<input name="providerDesc" class="input-text" type="text"> <input value="组 合 查 询" type="submit">
</form></td></tr>
</tbody></table>
</div>
<div class="main">
<div class="optitle clearfix">
<em><input value="添加数据" class="input-button" onclick="window.location='providerAdd.html'" type="button"></em>
<div class="title">供应商管理>></div>
</div>
<div class="content">
<table class="list">
<tbody><tr>
<td width="40" height="29"><div class="STYLE1" align="center">编号</div></td>
<td width="80"><div class="STYLE1" align="center">供应商名称</div></td>
<td width="190"><div class="STYLE1" align="center">供应商描述</div></td>
<td width="80"><div class="STYLE1" align="center">联系人</div></td>
<td width="100"><div class="STYLE1" align="center">电话</div></td>
<td width="100"><div class="STYLE1" align="center">地址</div></td>
<td width="60"><div class="STYLE1" align="center">操作</div></td>
</tr>
<%
List<SuperProviders> list = (List<SuperProviders>)request.getAttribute("providersList");
for(int i = 0;i<list.size();i++) {
SuperProviders sp = list.get(i);
%>
<tr>
<td width="40" height="29"><div class="STYLE1" align="center"><%=sp.getProviderid()%></div></td>
<td width="80"><div class="STYLE1" align="center"><%=sp.getProvidername()%></div></td>
<td width="190"><div class="STYLE1" align="center"><%=sp.getProviderdesc()%></div></td>
<td width="80"><div class="STYLE1" align="center"><%=sp.getCreator()%></div></td>
<td width="100"><div class="STYLE1" align="center"><%=sp.getProvidertel()%></div></td>
<td width="100"><div class="STYLE1" align="center"><%=sp.getProvideraddress()%></div></td>
<td width="60"><div class="STYLE1" align="center"><a href="PreUpdateProvidersServlet?providerid=<%=sp.getProviderid()%>">修改</a></div></td>
</tr>
<%
}
%>
</tbody></table>
</div>
</div>
</body>
</html>