文件名称:网页无组件上传图片与大家分享
文件大小:2KB
文件格式:RAR
更新时间:2011-10-04 16:21:50
不清楚
用于页面上传图片 ,不需要组件 private String[] sourceFile = new String[255]; //源文件名 private String[] suffix = new String[255]; //文件后缀名 private String canSuffix = ".gif.jpg.jpeg.png"; //可上传的文件后缀名 private String objectPath = "c:/"; //目标文件目录 private String[] objectFileName = new String[255]; //目标文件名 private ServletInputStream sis = null; //输入流 private String[] description = new String[255]; //描述状态 private long size = 100 * 1024; //限制大小 private int count = 0; //已传输文件数目 private byte[] b = new byte[4096]; //字节流存放数组 private boolean successful = true; private Hashtable fields = new Hashtable(); public UploadBean() { } //设置上传文件的后缀名 public void setSuffix(String canSuffix) { this.canSuffix = canSuffix; } //设置文件保存路径 public void setObjectPath(String objectPath) { this.objectPath = objectPath; } //设置文件保存路径 public void setSize(long maxSize) { this.size = maxSize; }
【文件预览】:
jsp无组件文件上传.txt