通过本文主要向大家介绍了ioexception,java.io.ioexception,ioexception异常,throws ioexception,ioexception是什么等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com
在做 jsp 上传图片时,把 java 代码直接改成 jsp,上传时产生 如下异常:
2012-12-31 8:59:21 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
java.io.IOException: Stream closed
...
百思不得其解,翻出 jsp 转成 servlet 后的代码。如下(很很的醒目一下):
PageContext 实现了抽象类 JspContext ,方法:pushBody(), 保存当前的out对象
public abstract class BodyContent
extends JspWriter
out 内置对象 </div>
2012-12-31 8:59:21 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet jsp threw exception
java.io.IOException: Stream closed
...
百思不得其解,翻出 jsp 转成 servlet 后的代码。如下(很很的醒目一下):
abstract void |
flush() Flush the stream. |
abstract void |
clear() Clear the contents of the buffer. |
PageContext 实现了抽象类 JspContext ,方法:pushBody(), 保存当前的out对象
BodyContent |
pushBody() Return a new BodyContent object, save the current "out" JspWriter, and update the value of the "out" attribute in the page scope attribute namespace of the PageContext. |
public abstract class BodyContent
extends JspWriter
out 内置对象 </div>