【发布时间】:2011-03-28 08:41:49
【问题描述】:
我有一个表格
<form name=frmMain method="POST" action="processUpload.jsp" enctype="multipart/form-data">
<p align="center"><table border="1" align="center" width="90%" cellspacing="0" bordercolordark="white" bordercolorlight="black">
<tr>
<td width="261" height="111">
<table border="0" cellspacing="0px" bordercolor="#B9B9B9" id="AutoNumber1" style="border-collapse: collapse" cellpadding="0px" align="left" width="100%" height="114">
<tr>
<td width="264" height="25" colspan="2" bgcolor="#FCDCA0">
<p align="left"><b><font face="Tahoma" size="2"> </font><font face="Tahoma">Upload you excel file</font></b></p>
</td>
</tr>
<tr>
<td width="15px" height="23">
<p align="right" style="vertical-align: middle"><font face="Verdana" size="2"><b> File: </b></font> </td>
<td width="300px" height="23">
<p align="left"> <input type="file" name="excelfile" size="40" >
</td>
</tr>
<tr>
<td width="15px" height="28">
<p align="center"></td>
<td height="28">
<p align="left">
<input type="submit" name="process" value="Process">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
我将此表单提交给 prcessUpload.jsp 在 processUpload.jsp 我上传文件,当上传文件完成后,我想重定向到包含表单的源页面。
问题:我想让这个 processUpload.jsp 通用,意味着我将在其他 Web 应用程序中重用它。无论页面向这个 jsp 页面发出请求,我都会得到源页面的确切名称。
任何建议或解决方案。提前致谢。
内森潘
【问题讨论】: