转自:https://blog.csdn.net/z69183787/article/details/18967927

1.

原因:

因为weblogic会向response中写东西造成的,解决方式是将此句response.reset();的注释打开,这样在使用response时先将其重置。

<%
 response.reset();//如果在weblogic底下同样要加上此句
 String filePath = request.getParameter("filePath");
 String disName = request.getParameter("disName");
  // 新建一个SmartUpload对象
 SmartUpload su = new SmartUpload();
  // 初始化
 su.initialize(pageContext);
  // 设定contentDisposition为null以禁止浏览器自动打开文件,
  //保证点击链接后是下载文件。若不设定,则下载的文件扩展名为
  //doc时,浏览器将自动用word打开它。扩展名为pdf时,
  //浏览器将用acrobat打开。
 su.setContentDisposition(null);
  // 下载文件
    String fileName = toUtf8String(disName);

try{
  su.downloadFile(filePath,null,fileName);
    }
    catch(java.io.FileNotFoundException e){
 %>
<script Language="javascript">
 alert('服务器上未找到要下载的文件!');
</script>
<%}
%>下载完毕!

java.net.ProtocolException: Exceeded stated content-length of: '13824' bytes的更多相关文章

  1. WCF常见异常-The maximum string content length quota (8192) has been exceeded while reading XML data

    异常信息:The maximum string content length quota (8192) has been exceeded while reading XML data 问题:调用第三 ...

  2. The maximum string content length quota (8192) has been exceeded while reading XML data

    原文:The maximum string content length quota (8192) has been exceeded while reading XML data 问题场景:在我们W ...

  3. 阿里巴巴 fastjson-1.2.12.jar json解析异常java.lang.ClassFormatError: Invalid method Code length 66865 in class file com/alibaba/fastjson/serializer/ASMSerializer_6_UserKdlb

    承接上篇:fastjson反序列化LocalDateTime失败的问题java.time.format.DateTimeParseException: Text '2019-05-24 13:52:1 ...

  4. 转载:回编译APK出错:java.nio.char set.MalformedInputException: Input length = 1

    使用APKtool回编译APK,出现错误如下:    Exception in thread "main" org.yaml.snakeyaml.error.YAMLExcepti ...

  5. 解决java.lang.NoClassDefFoundError: org.jdom.Content

    报错:java.lang.NoClassDefFoundError: org.jdom.Content 解决办法: 更新lib目录下的jdom.jar 至最新版本.

  6. String Matching Content Length

    hihocoder #1059 :String Matching Content Length 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 We define the ...

  7. java.net.ProtocolException:unexpected end of stream

    原因:php 给android 写接口出现java.net.ProtocolException:unexpected end of stream,查找android方面原因时发现数据超长 ,发现htm ...

  8. 定时器setInterval, innerText获取文本, charAt()获取单个字符串, substring(1, content.length)获取范围内的字符串, 实现字符串的滚动效果

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. java.net.ProtocolException: Server redirected too many times

    网页爬虫时,原来正常的代码,可能是因为网站做了cookie校验处理,报异常:java.net.ProtocolException: Server redirected too many times 表 ...

随机推荐

  1. fastjson合并json数组中相同的某个元素

    /** * @param array JSON数组 * @param array 需合并后的某个元素名 */ private static JSONArray mgreArray(JSONArray ...

  2. Flutter-Boxdecoration邊框線, 圓角

    decoration: BoxDecoration( borderRadius: BorderRadius.circular(8), border: Border( top: BorderSide( ...

  3. php strpos()函数 语法

    php strpos()函数 语法 作用:寻找字符串中某字符最先出现的位置.大理石平台怎么选择 语法:strpos(string,find,start) 参数: 参数 描述 string     必需 ...

  4. Bugku 杂项 这是一张单纯的图片

    这是一张单纯的图片 将图片用winhex打开 会发现在最后的部分有html实体编码 decode一下得到 key{you are right} 关于html实体编码 对于某些特殊字符如 < 与 ...

  5. Android逆向之旅---静态分析技术来破解Apk

    一.前言 从这篇文章开始我们开始我们的破解之路,之前的几篇文章中我们是如何讲解怎么加固我们的Apk,防止被别人破解,那么现在我们要开始破解我们的Apk,针对于之前的加密方式采用相对应的破解技术,And ...

  6. linux centos添加yum镜像

    下载配置文件,加入/etc/yum.repos.d/阿里镜像:http://mirrors.aliyun.com/repo/Centos-7.repo网易镜像:http://mirrors.163.c ...

  7. 牛客:t次询问,每次给你一个数n,求在[1,n]内约数个数最多的数的约数个数(数论+贪心)

    https://ac.nowcoder.com/acm/contest/907/B t次询问,每次给你一个数n,求在[1,n]内约数个数最多的数的约数个数 分析: 根据约数和定理:对于一个大于1正整数 ...

  8. Python 测评工具

    开源--Python测评工具 Github仓库 本次实验作业的测评工具仅使用Python语言编写. 程序思路是基于文本的快速匹配. 编译test.py运行 1.GUI界面 GUI界面使用了PyQt5完 ...

  9. scau 1079 三角形(暴力)

    </pre>1079 三角形</h1></center><p align="center" style="margin-top: ...

  10. Mac定制终端:iTerm2 + zsh + powerline

    原始界面:   配置后的界面:   安装iTerm2 可以直接去官网下载:https://www.iterm2.com/ 下载后直接安装即可 安装主题 所有主题:https://iterm2color ...