首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

Extjs Struts2文件下傳

2012-11-07 
Extjs Struts2文件上傳struts action 輸入流的方式:?或者是:包裝方法public String uploadfiles() {// 定

Extjs Struts2文件上傳

struts action 輸入流的方式:

?或者是:包裝方法

public String uploadfiles() {// 定义保存的路径String savepath = getSavePath();// 根据路径创建文件路径对象File file = new File(savepath);if (!file.exists()) {file.mkdirs();}try {for (int i = 0; i < pic.length; i++) {FileUtils.copyFile(pic[i], new File(file, getPicFileName()[i]));}} catch (Exception ex) {ex.printStackTrace();}return "SUCCESS";}

?

热点排行