我使用JspSmartUpload控件下载的时候,使用mySmartUpload.downloadFile(downloadpath); 有的可下载,有的会提示出错:
java.lang.IllegalStateException: getOutputStream() has already been called for this response
后来解决了,就是文件开始的<%%>都要紧挨着,不能有空格,更不能有换行,如:
<%@ page contentType="text/html; charset=GBK" %><%@ page import="java.io.*" %><%
java.lang.IllegalStateException: getOutputStream() has already been called for this response
后来解决了,就是文件开始的<%%>都要紧挨着,不能有空格,更不能有换行,如:
<%@ page contentType="text/html; charset=GBK" %><%@ page import="java.io.*" %><%
本文介绍了解决使用JspSmartUpload控件进行文件下载时出现的java.lang.IllegalStateException错误的方法。通过调整JSP文件中%@ page指令的位置和格式,确保其紧密相邻且不含空格或换行,可以有效避免此问题。

168

被折叠的 条评论
为什么被折叠?



