用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无法取得。
哪位大虾帮忙看下,可能是什么原因阿?
<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无法取得。
哪位大虾帮忙看下,可能是什么原因阿?
楼主【derek_jscn】截止到2008-07-16 13:54:18的历史汇总数据(不包括此帖):
发帖的总数量:2 发帖的总分数:20 每贴平均分数:10
回帖的总数量:1 得分贴总数量:0 回帖的得分率:0%
结贴的总数量:2 结贴的总分数:20
无满意结贴数:1 无满意结贴分:20
未结的帖子数:0 未结的总分数:0
结贴的百分比:100.00% 结分的百分比:100.00%
无满意结贴率:50.00 % 无满意结分率:100.00%
敬礼!