strust2技术,前台控件名 bean.属性名比如:user.name1 user.age等,在struts2中的action中成员变量private User user;再给它set get方法。这样当前台提交时自动将属性值name1 age等赋给user

strust2技术,前台控件名 bean.属性名比如:user.name1 user.age等,在struts2中的action中成员变量private User user;再给它set get方法。这样当前台提交
//密码确认密码不一致
//所有验证通过之后提交表单
; //这是一个文件复制类copyFile()里面就是IO操作,如果你不用这个类也可以自己写一个IO复制文件的类 } 其中private File[] upload;// 实际上传文件 private String[] uploadContentType; // 文件的内容类型 private String[] uploadFileName; // 上传文件名这三个参数必须这样命名,因为文件上传控件默认是封装了这3个参数的,且在action里面他们应有get,set方法!