jsp中file,怎么能够在action中找到
wer之路 2012-02-14 01:56:58 我在jsp中定义了一个file,代码如下
<span><input type="file" accept="application/vnd.ms-excel" name="excFil" id="excFil" value="<s:property value="excFil"/>" style="display:none" onChange="window.location.href='importTroublecodeList.action'"/></span>
我在对应的Action中,怎么才能找到对应的File,要不要先上传file,然后在解析。还是不用上传。请各位牛人讲讲。
(声明:我在Action中定义了
/**
* 導入的文件File
*/
private File excFil;
private String excFilFileName;
private String excFilContentType;
并且定义了set和get方法,可是改变时提醒File为空)