信而富app直接下载:jspsmartupload组件应用中下载异常的问题

来源:百度文库 编辑:杭州交通信息网 时间:2024/03/29 23:35:25
download.jsp页面源码如下:
<%@ page contentType="text/html;charset=gb2312"
import="com.jspsmart.upload.*" %><%
SmartUpload su = new SmartUpload();
su.initialize(pageContext);
su.setContentDisposition(null);
String fileName=(String)session.getAttribute("fileName");
su.downloadFile(fileName);
%>

fileName是通过session从上个页面传来,已证明是正确的;
运行代码时,对不同扩展名文件会出现不同情况:.doc .xls等可正确下载;.txt下载的时候会下载到一个名为download.jsp的空jsp文件;.gif下载时提示出错,出错代码为:java.lang.IllegalStateException: getOutputStream() has already been called for this response

请高手帮忙解决这个问题,急需,在线等,高分求助!