求教:下载文件时报错java.lang.IllegalStateException:
下载文件时报错:[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("模板文件不存在");
}
%>
请教是怎么回事啊?