formfile无法取得
用struts的formfile上传文件,代码如下。
jsp代码:
<html:file property = "theFile" size="47" maxlength="20" />
form的部分java代码:
private FormFile theFile;
public FormFile getTheFile() {
return theFile;
}
public void setTheFile(FormFile theFile) {
this.theFile = theFile;
}
action的部分java代码:
FormFile theFile = inputform.getTheFile();
theFile总是null,可是form中的其他field都能正常得到,只有formfile无法取得。
哪位大虾帮忙看下,可能是什么原因阿?