org.apache.struts2.showcase.filedownload
Class FileDownloadAction

java.lang.Object
  extended by org.apache.struts2.showcase.filedownload.FileDownloadAction
All Implemented Interfaces:
com.opensymphony.xwork2.Action

public class FileDownloadAction
extends Object
implements com.opensymphony.xwork2.Action

Demonstrates file resource download. Set filePath to the local file resource to download, relative to the application root ("/images/struts.gif").


Field Summary
 
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
FileDownloadAction()
           
 
Method Summary
 String execute()
           
 InputStream getInputStream()
           
 void setInputPath(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDownloadAction

public FileDownloadAction()
Method Detail

setInputPath

public void setInputPath(String value)

getInputStream

public InputStream getInputStream()
                           throws Exception
Throws:
Exception

execute

public String execute()
               throws Exception
Specified by:
execute in interface com.opensymphony.xwork2.Action
Throws:
Exception


Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.