下载文件时报错:[11:48:43.984] java.lang.IllegalStateException: http://localhost:8080/exceldown.
jsp: tried to write 28678 bytes with content-length 28672 (At char=0).源代码为:
<%@ page language="java" import="com.jspsmart.upload.*" %>
<%@ page language="java" import="java.io.File" %>
<jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
<%
String dir=request.getRealPath("/");
//String dir=request.getRealPath("/")+"download";
File f=new File(dir,"input.xls");
if(f.exists()){
mySmartUpload.initialize(pageContext);
mySmartUpload.setContentDisposition(null); //禁止浏览器自动打开文件
mySmartUpload.downloadFile("input.xls");
}else{
out.print("模板文件不存在");
}
%>
请教是怎么回事啊?
jsp: tried to write 28678 bytes with content-length 28672 (At char=0).源代码为:
<%@ page language="java" import="com.jspsmart.upload.*" %>
<%@ page language="java" import="java.io.File" %>
<jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
<%
String dir=request.getRealPath("/");
//String dir=request.getRealPath("/")+"download";
File f=new File(dir,"input.xls");
if(f.exists()){
mySmartUpload.initialize(pageContext);
mySmartUpload.setContentDisposition(null); //禁止浏览器自动打开文件
mySmartUpload.downloadFile("input.xls");
}else{
out.print("模板文件不存在");
}
%>
请教是怎么回事啊?
tried to write 28678 bytes with content-length 28672 最大只能写28672 字节 ..却写了28678 字节..
[11:46:09.000] java.lang.IllegalStateException: http://localhost:8080/output.jsp
: tried to write 13857 bytes with content-length 13824 (At char=0).下载的最大字节数怎么设置啊
这个就是完整路径了,虽然报错了,但是文件是可下载的,不过就是乱码了