struts實現多圖片上傳
package com.ninetowns.zhangc.struts.action;
public class Constant {
private Constant() {
}
public static Integer pictureSize = 10*1024*1024; //單位為byte 上傳文件最大限額;
public static String pictureDirectory = "upload\";
}
package com.ninetowns.zhangc.struts.action;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Collection;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.upload.FormFile;
import org.apache.struts.upload.MultipartRequestHandler;
public class PictureUpLoad {
private PictureUpLoad() {
非常好我支持^.^
(3) 100%
不好我反對
(0) 0%