前台
window.open('downFileAction?fileName='+result.fileName);
// 下载文件
@Action(value = "downFileAction")//, results = { @Result(name = "success", type = "stream") })
public void downFile() {
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
OutputStream os = null;
InputStream is = null;
String filePath = this.application.getRealPath("root"); //得到项目的web路径
try
{
File downloadFile = new File(filePath, this.fileName);
......
阅读全文