Class FileUploadAction
java.lang.Object
org.apache.struts2.ActionSupport
org.apache.struts2.showcase.fileupload.FileUploadAction
- All Implemented Interfaces:
Serializable,Action,UploadedFilesAware,ValidationAware,LocaleProvider,TextProvider,Validateable
Show case File Upload example's action.
FileUploadAction- See Also:
-
Field Summary
Fields inherited from class org.apache.struts2.ActionSupport
container -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlonginput()voidsetCaption(String caption) upload()voidwithUploadedFiles(List<UploadedFile> uploadedFiles) Notifies action about the multiple uploaded files, when a single file is uploaded the list will have just one elementMethods inherited from class org.apache.struts2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocale, getLocaleProvider, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocale, validate
-
Constructor Details
-
FileUploadAction
public FileUploadAction()
-
-
Method Details
-
input
- Overrides:
inputin classActionSupport- Throws:
Exception
-
upload
- Throws:
Exception
-
getContentType
-
getFileName
-
getOriginalName
-
getInputName
-
getUploadedFile
-
getCaption
-
setCaption
-
getUploadSize
public long getUploadSize() -
withUploadedFiles
Description copied from interface:UploadedFilesAwareNotifies action about the multiple uploaded files, when a single file is uploaded the list will have just one element- Specified by:
withUploadedFilesin interfaceUploadedFilesAware- Parameters:
uploadedFiles- a list ofUploadedFile, cannot be null. It can be empty.
-