Class FileDownloadAction
java.lang.Object
org.apache.struts2.showcase.filedownload.FileDownloadAction
- All Implemented Interfaces:
Action
Demonstrates file resource download.
Set filePath to the local file resource to download,
relative to the application root ("/images/struts.gif").
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()Where the logic of the action is executed.voidsetInputPath(String value)
-
Constructor Details
-
FileDownloadAction
public FileDownloadAction()
-
-
Method Details
-
execute
Description copied from interface:ActionWhere the logic of the action is executed.- Specified by:
executein interfaceAction- Returns:
- a string representing the logical result of the execution. See constants in this interface for a list of standard result values.
- Throws:
Exception- thrown if a system level exception occurs. Note: Application level exceptions should be handled by returning an error value, such asAction.ERROR.
-
setInputPath
-
getInputStream
- Throws:
Exception
-