FileDocCategorySizeDatePackage
MultipleFileUploadUsingArrayAction.javaAPI DocApache Struts 2.0.9 Apps2544Mon Jul 23 13:43:26 BST 2007org.apache.struts2.showcase.fileupload

MultipleFileUploadUsingArrayAction

public class MultipleFileUploadUsingArrayAction extends com.opensymphony.xwork2.ActionSupport
Showcase action - mutiple file upload using array.
version
$Date: 2006-11-23 12:31:52 -0500 (Thu, 23 Nov 2006) $ $Id: MultipleFileUploadUsingArrayAction.java 478625 2006-11-23 17:31:52Z wsmoak $

Fields Summary
private File[]
uploads
private String[]
uploadFileNames
private String[]
uploadContentTypes
Constructors Summary
Methods Summary
public java.io.File[]getUpload()

 return this.uploads; 
public java.lang.String[]getUploadContentType()

 return this.uploadContentTypes; 
public java.lang.String[]getUploadFileName()

 return this.uploadFileNames; 
public voidsetUpload(java.io.File[] upload)

 this.uploads = upload; 
public voidsetUploadContentType(java.lang.String[] uploadContentType)

 this.uploadContentTypes = uploadContentType; 
public voidsetUploadFileName(java.lang.String[] uploadFileName)

 this.uploadFileNames = uploadFileName; 
public java.lang.Stringupload()

        System.out.println("\n\n upload2");
        System.out.println("files:");
        for (File u: uploads) {
            System.out.println("*** "+u+"\t"+u.length());
        }
        System.out.println("filenames:");
        for (String n: uploadFileNames) {
            System.out.println("*** "+n);
        }
        System.out.println("content types:");
        for (String c: uploadContentTypes) {
            System.out.println("*** "+c);
        }
        System.out.println("\n\n");
        return SUCCESS;