注意文件响应处理方式,是响应为网页形式还是附件显示,看如下信息:
 
 
In a regular HTTP response, the Content-Disposition response header is a header indicating if the content is expected to be displayed inline in the browser, that is, as a Web page or as part of a Web page, or as an attachment, that is downloaded and saved locally.

In a multipart/form-data body, the HTTP Content-Disposition general header is a header that can be used on the subpart of a multipart body to give information about the field it applies to. The subpart is delimited by the boundary defined in the Content-Type header. Used on the body itself, Content-Disposition has no effect.

The Content-Disposition header is defined in the larger context of MIME messages for e-mail, but only a subset of the possible parameters apply to HTTP forms and POST requests. Only the value form-data, as well as the optional directive name and filename, can be used in the HTTP context.

For more information check out here.

  

Java File download的更多相关文章

  1. How to Convert a Class File to a Java File?

    What is a programming language? Before introducing compilation and decompilation, let's briefly intr ...

  2. Java File类总结和FileUtils类

    Java File类总结和FileUtils类 文件存在和类型判断 创建出File类的对象并不代表该路径下有此文件或目录. 用public boolean exists()可以判断文件是否存在. Fi ...

  3. Java File 类的使用方法详解

    Java File类的功能非常强大,利用Java基本上可以对文件进行所有的操作.本文将对Java File文件操作类进行详细地分析,并将File类中的常用方法进行简单介绍,有需要的Java开发者可以看 ...

  4. Java File 类的使用方法详解(转)

    转自:http://www.codeceo.com/article/java-file-class.html Java File类的功能非常强大,利用Java基本上可以对文件进行所有的操作.本文将对J ...

  5. Java——File类成员方法

    body, table{font-family: 微软雅黑} table{border-collapse: collapse; border: solid gray; border-width: 2p ...

  6. ASP.NET MVC file download sample

    ylbtech- ASP.NET MVC:ASP.NET MVC file download sample 功能描述:ASP.NET MVC file download sample 2,Techno ...

  7. An error occurred at line: 1 in the generated java file问题处理

    tomcat6启动后,加载jsp页面报错,提示无法将jsp编译为class文件,主要报错信息如下: An error occurred at line: 1 in the generated java ...

  8. 报错:An error occurred at line: 22 in the generated java file The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

    org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 22 in ...

  9. Pikachu-File Inclusion, Unsafe file download & Unsafe file upload

    Pikachu-File Inclusion, Unsafe file download & Unsafe file upload 文件包含漏洞 File Inclusion(文件包含漏洞)概 ...

随机推荐

  1. Linux-echo:打印彩色输出

    脚本可以使用转义序列在终端中生成彩色文本 文本颜色是由对应的色彩码来描述的.其中包括: 重置=0,黑色=30,红色=31,绿色=32, 黄色=33,蓝色=34,洋红=35,青色=36,白色=37. 要 ...

  2. 有关java5以后的线程

    创建线程的方式 方式一 继承于Thread类 /** * 多线程的创建,方式一:继承于Thread类 * 1. 创建一个继承于Thread类的子类 * 2. 重写Thread类的run() --> ...

  3. Vue.js学习笔记-script标签在head和body的区别

    初学JavaScript,项目需要没有系统学习,只能边查资料边码代码,埋下的坑不知道有多少,还是建议时间充足的情况下系统的将Javascript学习一遍 ,涉及的HTML知识也务必了解. 问题 最开始 ...

  4. JavaWeb应用系统开发实训任务(一)

    项目描述: 随着家长对孩子教育的日渐重视,社区幼儿学校在国内逐渐兴起,对社区幼儿学校的信息化管理成为迫切需求.社区幼儿学校管理系统需要实现以下功能: 1)  教师管理:实现对教师信息的查询.删除.增加 ...

  5. hashMap,hashTable,TreeMap,concurrentHashMap区别

    hashMap: 基于哈希表实现 treeMap: 基于二叉树实现,适用于排序 hashTable: 底层还是HashMap,在方法上加了同步 concurrentHashMap: java7底层通过 ...

  6. 树莓派3B+和3B 安装64位debian GUN/Linux系统

    请直接参考如下博客: https://blog.csdn.net/u013451404/article/details/80710136 如果是3B的树莓派用户,只需要把第一个分区boot里的.dtb ...

  7. Oracle连接字符串总结(转)

    Oracle XE 标准连接 Oracle XE(或者"Oracle Database 10g Express Edition")是一个简单免费发布的版本. 以下是语法格式: Dr ...

  8. mysq练习

    表名和字段 –1.学生表Student(s_id,s_name,s_birth,s_sex) --学生编号,学生姓名, 出生年月,学生性别–2.课程表Course(c_id,c_name,t_id) ...

  9. js之语句(表达式语句,复合语句,声明语句)

    语句就是JavaScript整句或命令,以分号结束,用来执行以使某件事发生.下面将介绍三种语句:表达式语句,复合语句,声明语句. 一.表达式语句 表达式语句是javascript中最简单的语句 < ...

  10. js安全类型检测

    背景: 都知道js内置的类型检测,大多数情况下是不太可靠的,例如:  typeof  . instanceof typeof 返回一个未经计算的操作数的类型, 可以发现所有对象都是返回object  ...