|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork2.ActionSupport
com.gisgraphy.webapp.action.BaseAction
com.gisgraphy.webapp.action.FileUploadAction
public class FileUploadAction
Sample action that shows how to do file upload with Struts 2.
Field Summary |
---|
Fields inherited from class com.gisgraphy.webapp.action.BaseAction |
---|
cancel, CANCEL, delete, from, log, mailEngine, mailMessage, roleManager, save, templateName, userManager |
Fields inherited from class com.opensymphony.xwork2.ActionSupport |
---|
LOG |
Fields inherited from interface com.opensymphony.xwork2.Action |
---|
ERROR, INPUT, LOGIN, NONE, SUCCESS |
Constructor Summary | |
---|---|
FileUploadAction()
|
Method Summary | |
---|---|
java.lang.String |
execute()
Default method - returns "input" |
java.io.File |
getFile()
|
java.lang.String |
getFileContentType()
|
java.lang.String |
getFileFileName()
|
java.lang.String |
getName()
|
void |
setFile(java.io.File file)
|
void |
setFileContentType(java.lang.String fileContentType)
|
void |
setFileFileName(java.lang.String fileFileName)
|
void |
setName(java.lang.String name)
|
java.lang.String |
upload()
Upload the file |
void |
validate()
|
Methods inherited from class com.gisgraphy.webapp.action.BaseAction |
---|
cancel, getConfiguration, getRequest, getResponse, getSession, saveMessage, sendUserMessage, setDelete, setFrom, setMailEngine, setMailMessage, setRoleManager, setSave, setTemplateName, setUserManager |
Methods inherited from class com.opensymphony.xwork2.ActionSupport |
---|
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, doDefault, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setFieldErrors |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileUploadAction()
Method Detail |
---|
public java.lang.String upload() throws java.lang.Exception
java.lang.Exception
- if something goes wrongpublic java.lang.String execute()
execute
in interface com.opensymphony.xwork2.Action
execute
in class com.opensymphony.xwork2.ActionSupport
public void setFile(java.io.File file)
public void setFileContentType(java.lang.String fileContentType)
public void setFileFileName(java.lang.String fileFileName)
public void setName(java.lang.String name)
public java.lang.String getName()
public java.io.File getFile()
public java.lang.String getFileContentType()
public java.lang.String getFileFileName()
public void validate()
validate
in interface com.opensymphony.xwork2.Validateable
validate
in class com.opensymphony.xwork2.ActionSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |