日期:2014-05-17 浏览次数:20736 次
public InputStream getInputStream(){ return ServletActionContext.getServletContext().getResourceAsStream("/upload/20032008126.jpg"); }
<action name="download" class="com.struts.action.DownloadAction"> <result name="success" type="stream"> <param name="contentType">image/jpeg</param> <param name="contentDisposition">filename="20032008126.jpg"</param> <param name="inputName">inputStream</param> </result> </action>