jsp页面报“缺少对象”错误是怎么回事
我用的是struts1框架,要上传excel,现在页面中表单提交的时候根本进入不到后台,执行完js的onclick事件之后就提示缺少对象,我alert()的时候,不管alert哪里都先出alert,然后提示是否确定批量上传,点击确定之后就会提示缺少对象。这是怎么回事呢,这种错误我都应该从哪些方面去寻找错误点呢,下面是代码,求大神指点一下,谢谢哒
<%@ page language="java" import="java.util.*,hasl.reserve.form.*" pageEncoding="GBK"%>
<%@ include file="../taglib-import.jspf" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String batId = (String)request.getParameter("batId");
if(batId==null){
batId = "";
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link href="./css/main.css" rel="stylesheet" type="text/css">
<style type="text/css">
.message {
text-align: left;
color: #000000;
padding: 10px;
background-color: #000000;
background-image: url(./images/bg_btn.gif);
}
</style>
<script language="JavaScript">
function dosubmit(){
if(confirm("您确定要批量上传?")){
disableActions();
document.fileUploadForm.action = '<%=path%>/fileUpload/upload.do';
alert(0);
document.fileUploadForm.submit();
}
}
</script>
<title>费率维护批量上传</title>
<body onload="top.document.title=document.title;">
<html:form method="POST" action="/fileUpload/upload" enctype="multipart/form-data">
<div id="mainBody">
<div id="guideArea">
<table width="97.5%" border="0" cellpadding="5" cellspacing="0">
<tr>
<td nowrap class="workPass">费率维护批量上传</td>
</tr>
</table>
</div>
<div id="messageArea" class="noMessage">
<div id="msg"></div>
</div>
<div class="detailTable">
<table width="97.5%" border="0" cellpadding="0" cellspacing="0">
<tr>
<th width="230" class="headItem">项目</th>
<th class="rightEdge">内容</th>
</tr>
<tr>
<td nowrap class="labelArea">输入文件</td>
<td class="inputArea"><html:file property="file" styleClass="inputTxt" size="60"/></td>
</tr>
<tr>
<td nowrap class="labelArea"></td>
<td class="inputArea"></td>
</tr>
</table>
<div id="messageArea">
</div>
<div class="btn">
<input type="button" onclick="dosubmit()" class="nomalBtn" value="上传" name="btnInsert">
</div>
<font color="red" size="2"><html:errors/><html:errors property="insert.failure"/></font>
</div>
</div>
<html:hidden property="batId" value="<%=batId %>"/>
</html:form>
</body>
</html>