文件下载
public InputStream getSimpleDownloadStream()
{
ServletContext sc= ServletActionContext.getServletContext();
InputStream is= sc.getResourceAsStream("/WEB-INF/pdf/1.pdf");
return is;
}
<result name="report" type="stream">
<param name="contentType">application/pdf</param>
<param name="contentDisposition">
filename="report.pdf"
</param>
<param name="inputName">simpleDownloadStream</param>
</result>