JSP页面动态验证码的问题
JSP页面可以动态产生验证码,但在Eclipse里老报这个错误:
java.lang.IllegalStateException: getOutputStream() has already been called for this response
网上找说是Tomcat5.0会出现这个问题,我用是Tomcat6.0啊!
------解决方案--------------------流转化问题
ImageIO.write(image, "JPEG ", response.getOutputStream());
out.clear();
out = pageContext.pushBody();
%>
最后加这两句试下