java.lang.IllegalStateException:getOutputStream() has already been called for this response这是什么错误?源代码:生成验证码

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/29 17:19:00
java.lang.IllegalStateException:getOutputStream() has already been called for this response这是什么错误?源代码:生成验证码

java.lang.IllegalStateException:getOutputStream() has already been called for this response这是什么错误?源代码:生成验证码
java.lang.IllegalStateException:getOutputStream() has already been called for this response
这是什么错误?源代码:生成验证码

java.lang.IllegalStateException:getOutputStream() has already been called for this response这是什么错误?源代码:生成验证码
response的outputStream已经被调用获取过了,不能重复调用response.getOutputStream方法.
这是在JSP里写的代码吧?JSP里有一个out变量,代表response的outputStream,试一试
ImageIO.write(image,"JPEG",out);