出自CSDN http://blog.csdn.net/yuanboitliuyuan/article/details/3994591
java.net.ProtocolException: Exceeded stated content-length of: '13824' bytes 用jspSmartUpload.jar下载 出错
2009-03-16 14:49 391人阅读 评论(0) 收藏 举报
java.net.ProtocolException: Exceeded stated content-length of: '13824' bytes 用jspSmartUpload.jar下载 出错:
原因:
因为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>
<%}
%>下载完毕!
至此文件下载介绍完毕。
分享到:
相关推荐
sitemesh 2.4.2 weblogic 报错:Didn't meet stated Content-Length
自用CVE-2018-3191 weblogic反序列化exp。
weblogic反序列化补丁包
Weblogic补丁【2017-10-13补丁】,应该是针对反序列化漏洞的补丁
weblogic10.36 CVE-2018-2893补丁文件 最新补丁文件,修复 WebLogic(CVE-2018-2893)安全漏洞预警,oracle官方发布了2018年4月份的关键补丁更新CPU(CriticalPatchUpdate),其中包含一个高危的Weblogic反序列化漏洞...
K8 weblogic-CVE-2018-2628-getshell 渗透测试工具!请勿滥用! K8 weblogic-CVE-2018-2628-getshell 渗透测试工具!请勿滥用!
----------------------------------20191010 ---------------------------- 本方法经本人亲自使用写下,在 检查 冲突 一步 检查 了很久大约 30分钟 ,但是最后也是成功了,所以只要不报错就可以 把补丁打上,如果 ...
weblogic CVE-2018-2628--exp
WebLogic Web Server Plug-In 12c is backward compatible with WebLogic Web Server Plugins 11gR1 but supports only 64-bit Web Servers.Please refer Oracle WebLogic Web Server Plug-In 12.1.3 documentation ...
2018最新weblogic反序列化漏洞补丁包 CVE-2018-2628补丁
Weblogic9.2-for-Linux安装手册.doc
Weblogic10.3.6-2204-2207补丁集 WLS PATCH SET UPDATE 10.3.6.0.220719 Patch 34009030 10.3.6.0.220419 Patch 33791826 10.3.6.0.220118 Patch 33494814 Patch 32973233 Coherence 3.7.1 Patch 22 (3.7.1.22) wls...
Weblogic CVE-2017-10271.zip
WebLogic的初步研究--安装篇,由浅入深,对于初学者是很好的教材
WebLogic CVE-2018-3191 payload 检测工具。
WebLogic的初步研究--结构篇,对于初学者很有帮助,需要下去看看吧
使用weblogic12c发布jax-ws的webservice服务端,启动时报错“metro-default.xml not fund ”百度了很长时间,方案都不能解决问题,后来goole了一下,参考了一个网页,非常管用,考虑到google有些同学没法访问,特地...
weblogic集群配置方法-具体实施步骤