日期:2014-05-17 浏览次数:20629 次
public class FileDownActions extends ActionSupport {
private String download;
private String inputPath;
public String getInputPath() {
return inputPath;
}
public void setInputPath(String inputPath) {
this.inputPath = inputPath;
}
public String getDownload() {
return download;
}
public void setDownload(String download) {
this.download = download;
}
public InputStream getTargetFile() throws Exception
{
return ServletActionContext.getServletContext().getResourceAsStream(inputPath+download);
}
public String execute(){
return SUCCESS;
}
}