package action;
import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.io.FileUtils;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import common.common;
public class uploadaction extends ActionSupport{
public String SessionName;
public String getSessionName() {
return SessionName;
}
public void setSessionName(String sessionName) {
SessionName = sessionName;
}
public String execute()throws Exception{
return "success";
}
public String upload() throws Exception
{
String realPath = common.getApplicationResourcesValue("filepath");
File fileDir = new File(realPath);
if (!fileDir.exists()) {
fileDir.mkdir();
}
for(int i=0; i<Filedata.size();i++)
{
File target = new File(fileDir,FiledataFileName.get(i));
FileUtils.copyFile(Filedata.get(i), target);
}
// ActionContext actionContext = ActionContext.getContext();
// Map session = actionContext.getSession();
// SessionName = session.get("zzpsessionname").toString();
//
return "success";
}
/** 文件对象 */
private List<File> Filedata;
/** 文件名 */
private List<String> FiledataFileName;
/** 文件内容类型 */
private List<String> FiledataContentType;
/**
* @return the filedata
*/
public List<File> getFiledata() {
return Filedata;
}
/**
* @param filedata the filedata to set
*/
public void setFiledata(List<File> filedata) {
Filedata = filedata;
}
/**
* @return the filedataFileName
*/
public List<String> getFiledataFileName() {
return FiledataFileName;
}
/**
* @param filedataFileName the filedataFileName to set
*/
public void setFiledataFileName(List<String> filedataFileName) {
FiledataFileName = filedataFileName;
}
/**
* @return the filedataContentType
*/
public List<String> getFiledataContentType() {
return FiledataContentType;
}
/**
* @param filedataContentType the filedataContentType to set
*/
public void setFiledataContentType(List<String> filedataContentType) {
FiledataContentType = filedataContentType;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
FLASH 文件批量上传程序
共26个文件
java:3个
xml:3个
class:3个
需积分: 3 21 下载量 2 浏览量
2010-04-21
20:51:54
上传
评论
收藏 335KB RAR 举报
温馨提示
strust2 flash 文件批量上传程序,Java语言你编写,完全开源。
资源推荐
资源详情
资源评论
收起资源包目录
strust2 flash 文件批量上传.rar (26个子文件)
strust2 flash 文件批量上传
.project 1KB
.settings
.jsdtscope 500B
org.eclipse.jdt.core.prefs 330B
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.jsdt.ui.superType.name 6B
.mymetadata 297B
WebRoot
WEB-INF
web.xml 671B
lib
classes
action
uploadaction.class 3KB
indexaction.class 446B
common
common.class 2KB
struts.xml 601B
zzp_zh_CN.properties 22B
index.jsp 2KB
upload.jsp 3KB
META-INF
MANIFEST.MF 36B
CSS
FlowStyle.css 6KB
更多程序下载.url 111B
flash
ZZPUpLoadFile.swf 321KB
程序在线支持.url 110B
.myeclipse
src
action
uploadaction.java 3KB
indexaction.java 526B
common
common.java 858B
struts.xml 601B
zzp_zh_CN.properties 22B
.mystrutsdata 240B
.classpath 687B
共 26 条
- 1
资源评论
tsingkingnet
- 粉丝: 1
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功