<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <%@ page import = "com.sysmodel.datamodel.xmlmodel.ModelFactory" import = "com.sysmodel.datamodel.xmlmodel.able.SysModel" import = "com.persistence.service.SysPersistence" import = "com.persistence.service.PersistenceFactory" import = "javax.servlet.ServletOutputStream" import = "java.io.PrintWriter" import = "java.util.ArrayList" import = "com.sinosoft.common.upLoad.util.*" import = "com.sinosoft.common.upLoad.service.UploadManageable" import = "com.sinosoft.common.upLoad.service.UploadManageImpl" import = "java.net.URLDecoder" import = "com.sinosoft.am.zip.ZipFileUtil" import = "com.system.configer.vo.WSClientConfigure" import = "org.springframework.context.support.ClassPathXmlApplicationContext" import = "java.io.File" import = "java.lang.String" import = "java.util.Map" import = "java.util.HashMap" %> <%@page import="java.io.OutputStream"%> <%@page import="java.net.URLDecoder"%> <% response.setCharacterEncoding("UTF-8"); String objectID = request.getParameter("objectID") == null ? "" : request.getParameter("objectID"); //String classId = request.getParameter("classid") == null ? "" : request.getParameter("classid"); //存储的文件名 Sys_Comm_FileImg NAME + "." + FILEEXT;如果有多个,就用";"隔开。 String filenames = request.getParameter("filenames") == null ? "" : request.getParameter("filenames"); //保存的文件名。Sys_Comm_FileImg SAVENAME+ "." + FILEEXT;如果有多个,就用";"隔开。 String downfilename = request.getParameter("downfilename") == null ? "" : request.getParameter("downfilename"); //autopath=false 自己传入完整路径文件 String autopath = request.getParameter("autopath") == null ? "" : request.getParameter("autopath"); //optmethod 文件处理方式 //open 打开文件 String optmethod = request.getParameter("optmethod") == null ? "" : request.getParameter("optmethod"); filenames = URLDecoder.decode(filenames, "UTF-8"); downfilename = URLDecoder.decode(downfilename, "UTF-8"); String uploadType = request.getParameter("uploadType") == null ? "path" : "blob"; //filenames = new String(filenames.getBytes("iso-8859-1"),"utf-8"); response.reset(); //获取文件存储的位置upload文件夹的位置 WSClientConfigure configure = (WSClientConfigure) new ClassPathXmlApplicationContext( "applicationContext.xml").getBean("WSClientConfigure"); String downloadPath = request.getSession().getServletContext() .getRealPath(configure.getUploadPath()); try { String zipfileName = ZipFileUtil.getZipFileName()+".zip"; //String zipFilePath = "e:\\ziptest\\rawfiles"; Map fileNames = new HashMap(); String[] filenames_map = filenames.split(";"); String[] downfilename_map = downfilename.split(";"); for(int i =0;i