博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Struts2下载配置contentDisposition的含义
阅读量:6735 次
发布时间:2019-06-25

本文共 350 字,大约阅读时间需要 1 分钟。

hot3.png

  • 文件下载时显示另存为的文件名
  • 在contentDisposition中配置attachment,可保证点击下载链接时弹出下载提示框

      <result type="stream">

        <param name="contentType">image/jpeg</param>

        <param name="inputName">targetFile</param>

        <param name="contentDisposition">

            attachment;filename="中文文件名称.jpg"

        </param>

        <param name="bufferSize">1024</param>

    </result>

转载于:https://my.oschina.net/chendongj/blog/1548262

你可能感兴趣的文章
Flutter的教程:ListView
查看>>
xxl-job安装教程
查看>>
SpringBoot(十八)@value、@Import、@ImportResource、@PropertySource
查看>>
[dubbo] Dubbo API 笔记——配置参考
查看>>
The last access date is not changed even after reading the file on Windows 7
查看>>
SQL Server 字符串处理函数
查看>>
恢复系统管理员密码的五大奇招
查看>>
英语形容“漂亮女孩”知多少
查看>>
GridView 获取当前行的索引值
查看>>
PHPCMS V9二次开发:内容模块PC标签调用详解
查看>>
Virtual-Key Codes
查看>>
Azure China (3) 使用Visual Studio 2013证书发布Cloud Service至Azure China
查看>>
xmapp 404设置
查看>>
[js - 算法可视化] 汉诺塔(Hanoi)演示程序
查看>>
Note:JSON
查看>>
分享.NET 3.0的书籍下载(持续更新中)
查看>>
几道有意思的逻辑分析题
查看>>
apache svn下新建一个项目
查看>>
高效 JavaScript 单元测试(转)
查看>>
[Windows Azure] What is a cloud service?
查看>>