大侠来解释一下struts2文件上传问题!!!!
昨天在做一个struts2文件上传,页面定义了如下:
<form action="yjssxStudent/PostgraduateSubmitThesis!uploadThesis.action" enctype="multipart/form-data">
<table width="80%" height="418" border="1" style="border-collapse:collapse" bordercolor="#999999">
<tr>
<td width="134" height="55"><div align="left">标题: </div></td>
<td width="606"><div align="left">
<input type="text" height="25" name="title" size="50" />
</div></td>
</tr>
<tr>
<td width="134" height="55"><div align="left">发送日期: </div></td>
<td width="606"><div align="left">
<input readonly="readonly" type="text" name="date"
onclick="getDateString(this,oCalendarChs)" />
</div></td>
</tr>
<tr>
<td width="134" height="55"><div align="left">论文上传: </div></td>
<td width="606"><div align="left">
<input type="file" name="uploadFile"/>
</div></td>
</tr>
<tr>
<td height="322"><div align="left">备注:</div></td>
<td><div align="left">
<FCK:editor instanceName="comment" basePath="/fckeditor" value=" " width="100%" height="500" toolbarSet="mytools1"></FCK:editor>
</div></td>
</tr>
<tr>
<td height="31"><div align="left">
<input type="submit" value="发送" />
</div></td>
<td><div align="left"></div></td>
</tr>
</table>
</form>
提交后报错说没有uploadFile的get set方法,整了一晚上都不知道咋回事,最后加了个method="post"就好了,哪位大侠能解释一下struts2文件上传为什么用post方法?