weblogic 11g java.net.ProtocolException: Exceeded stated content-length of: '13824' bytes
来源:互联网 发布:手机数独软件 编辑:程序博客网 时间:2024/05/07 13:42
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>
<%}
%>下载完毕!
至此文件下载介绍完毕。
原因:
因为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>
<%}
%>下载完毕!
至此文件下载介绍完毕。
0 0
- weblogic 11g java.net.ProtocolException: Exceeded stated content-length of: '13824' bytes
- java.net.ProtocolException: Exceeded stated content-length of: '6144' bytes
- java.net.ProtocolException: Exceeded stated content-length of: '13824' bytes 用jspSmartUpload.jar下载 出错
- 解决weblogic下报java.net.ProtocolException: Exceeded stated content-length of异常问题
- 解决在weblogic上报java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '146592' bytes instead of stated: '462285' by
- Weblogic: Exceeded stated content-length
- 关于weblogic下java.net.ProtocolException: Didn't meet stated Content-Length, wrote: 异常
- 关于weblogic下java.net.ProtocolException: Didn't meet stated Content-Length, wrote:
- didn't meet stated Content-length,wrote:'133' bytes instead of stated '204' bytes
- 关于weblogic下Did not meet stated content length of OutputStream异常
- Windows部署Weblogic问题:Didn't meet stated Content-Length
- sitemesh 2.4.2在weblogic中Didn't meet stated Content-Length问题
- java.net.ProtocolException: unexpected end of stream
- java.net.ProtocolException翻译
- 关于OKhttp的异常:java.net.ProtocolException: expected 6137 bytes but received 7081
- Warning: Unknown: POST Content-Length of 53 bytes exceeds the limit of 0 bytes in Unknown on line 0
- Warning: POST Content-Length of 81360713 bytes exceeds the limit of 3145728 bytes in Unknown on line
- 记一次android Bug解决的曲折心路历程(java.net.ProtocolException: expected 0 bytes but received 2048)
- linux墙上时间xtime与高精度时钟gettimeofday
- what is RCS/RCS-e
- Eclipse开发环境搭建
- weblogic 11g java.io.IOException: response already committed
- java中的String类(来自毕向东老师视频资料)
- weblogic 11g java.net.ProtocolException: Exceeded stated content-length of: '13824' bytes
- java单点登录的实现
- ubuntu: ssh service
- 软件设计是怎样炼成的(5)——规划系统的骨架(架构设计)(上篇)
- IMS Push-to-talk over Cellular (PoC) Call Flow Diagrams
- java中的String类的练习(来自毕向东老师视频资料)
- 《人月神话》
- [C/C++标准库]_[初级]_[集合操作]
- 简单理解java.lang.IllegalStateException异常:简单分析和简单解决方案