|
||||||||||
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 | |
---|---|
String |
execute()
Default method - returns "input" |
File |
getFile()
|
String |
getFileContentType()
|
String |
getFileFileName()
|
String |
getName()
|
void |
setFile(File file)
|
void |
setFileContentType(String fileContentType)
|
void |
setFileFileName(String fileFileName)
|
void |
setName(String name)
|
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 String upload() throws Exception
Exception
- if something goes wrongpublic String execute()
execute
in interface com.opensymphony.xwork2.Action
execute
in class com.opensymphony.xwork2.ActionSupport
public void setFile(File file)
public void setFileContentType(String fileContentType)
public void setFileFileName(String fileFileName)
public void setName(String name)
public String getName()
public File getFile()
public String getFileContentType()
public 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 |