2013年9月20日
摘要: 单个文件上传关于如何创建Struts2项目:Struts2 初体验。一、创建jsp页面:注意!要上传文件,表单必须添加 enctype 属性,如下: enctype="multipart/form-data"index.jsp 代码如下:Insert title here 二、创建Action类:1. 添加三个私有字段,并添加相应的get,set方法。 private File file; ——上传的文件,变量名对应页面上"file"input的name属性值。类型为java.io.File private String fileCon... 阅读全文
posted @ 2013-09-20 20:23 喜欢凯的蓝 阅读(8087) 评论(1) 推荐(3) 编辑