服务热线:13616026886

技术文档 欢迎使用技术文档,我们为你提供从新手到专业开发者的所有资源,你也可以通过它日益精进

位置:首页 > 技术文档 > JAVA > 新手入门 > 基础入门 > 查看文档

struts构建文件上传(二)


  这是第二个类actionform,
package tester.business.maitain;

import org.apache.struts.action.*;
import javax.servlet.http.*;
import org.apache.struts.upload.*;

public class maintainform
extends actionform {

/** private string p_title;
private int post_index;
private string issue_time;
private string issue;
private string p_content;
private string p_accessory;
private int p_id;
private java.util.arraylist post_indexopts;
*/
private trainplan trainplan = new trainplan();
private org.apache.struts.upload.formfile thefile1;
private org.apache.struts.upload.formfile thefile2;
private org.apache.struts.upload.formfile thefile3;

public string getp_title() {
return trainplan.getp_title();
}

public void setp_title(string p_title) {
trainplan.setp_title(p_title);
}

public void settrainplan(trainplan trainp) {
this.trainplan = trainp;

}

public trainplan gettrainplan() {
return this.trainplan;

}

public void setthefile1(org.apache.struts.upload.formfile thefile1) {
this.thefile1 = thefile1;
}

public org.apache.struts.upload.formfile getthefile2() {
return thefile2;
}

public void setthefile2(org.apache.struts.upload.formfile thefile2) {
this.thefile2 = thefile2;
}

public org.apache.struts.upload.formfile getthefile3() {
return thefile3;
}

public void setthefile3(org.apache.struts.upload.formfile thefile3) {
this.thefile3 = thefile3;
}

public org.apache.struts.upload.formfile getthefile1() {
return thefile1;
}

public actionerrors validate(actionmapping actionmapping,
httpservletrequest httpservletrequest) {
/**@todo: finish this method, this is just the skeleton.*/
return null;
}

public void reset(actionmapping actionmapping,
httpservletrequest httpservletrequest) {
}

}

扫描关注微信公众号