struts2文件下载类型的设置

<result name="success" type="stream">
  <param name="contentType">image/jpeg</param>
  <param name="inputName">imageStream</param>
  <param name="contentDisposition">attachment;filename="document.pdf"</param><!--此处文件下载名为document.pdf-->
  <param name="bufferSize">1024</param>
</result> 
 

 

你可能感兴趣的:(struts2)