本文主要是介绍问题:getOutputStream() has already been called,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
2009-9-14 16:16:54 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet jsp threw exception java.lang.IllegalStateException: getOutputStream() has already been called for this responseat org.apache.catalina.connector.Response.getWriter(Response.java:610)at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:186)at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)at org.apache.jsp.index_jsp._jspService(index_jsp.java:83) ……
java.lang.IllegalStateException: getOutputStream() has already been called for this response
这是我当前碰到的异常,此异常非一般的图片验证码输出流之类的,
产生缘由:输入顶级或二级域名,自定义标签处理(标签核心代码见下),然后跳转到相应 Action,action里面若没有静态页就重新生成一遍,若有的话就直接跳转去访问静态页
自定义标签
try {RequestDispatcher rs = request.getSession().getServletContext().getRequestDispatcher(todo);rs.forward(request, response);} catch (IOException e) {e.printStackTrace();this.forword(request, response, URLForHomeSiteIndex);}
这篇关于问题:getOutputStream() has already been called的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!