You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Keith Cheng <ke...@maxistech.com> on 2001/11/23 06:20:40 UTC

java.lang.IllegalStateException: getOutputStream() has already been called for this response

Dear all,

	Finally, I got my taglib test cases running but I got the following error
after the test:

[EmbeddedCatalinaServiceSX] StandardWrapperValve[JspRedirector]:
Servlet.service() for servlet JspRedirector threw excep
tion
java.lang.IllegalStateException: getOutputStream() has already been called
for this response
        at org.apache.catalina.connector.ResponseBase.getWriter(Unknown
Source)
        at org.apache.catalina.connector.ResponseFacade.getWriter(Unknown
Source)
        at org.apache.jasper.runtime.JspWriterImpl.initOut(Unknown Source)
        at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(Unknown
Source)
        at org.apache.jasper.runtime.JspWriterImpl.flush(Unknown Source)
        at org.apache.jasper.runtime.PageContextImpl.release(Unknown Source)
        at
org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(Unknown
Source)
        at
org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(Unknown Source)
        at
org.apache.jsp.jspRedirector$jsp._jspService(jspRedirector$jsp.java:91)
        at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown
Source)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown
Source)
        at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Unknown
Source)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(Unknown
Source)
        at org.apache.catalina.core.StandardWrapperValve.invoke(Unknown
Source)
        at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.catalina.core.StandardContextValve.invoke(Unknown
Source)
        at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
        at org.apache.catalina.valves.CertificatesValve.invoke(Unknown
Source)
        at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.catalina.core.StandardContext.invoke(Unknown Source)
        at org.apache.catalina.core.StandardHostValve.invoke(Unknown Source)
        at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.catalina.core.StandardEngineValve.invoke(Unknown
Source)
        at org.apache.catalina.core.StandardPipeline.invokeNext(Unknown
Source)
        at org.apache.catalina.core.StandardPipeline.invoke(Unknown Source)
        at org.apache.catalina.core.ContainerBase.invoke(Unknown Source)
        at org.apache.catalina.connector.http.HttpProcessor.process(Unknown
Source)
        at org.apache.catalina.connector.http.HttpProcessor.run(Unknown
Source)
        at java.lang.Thread.run(Thread.java:484)

	The tests finished successfully and anyone know what is this exception for?
I am running tomcat 4.0 + JBoss 2.4.3.

	Thanks in advance.

	In addition, many people got the java.io.StreamCorruptedException error. I
had this problem before too and my problem is that I put the context path in
JspRedirector servlet mapping like this "/test/jspRedirector.jsp" since the
example says: "/somewhere/jspRedirector.jsp".  However, the "/test" should
be removed since I put the jspRedirector.jsp in the root of my context path.
I suggest that the example should omit the "/somewhere" since it is a bit
confusing, isn't it?

---- Keith Cheng
---  keithcheng@maxistech.com
--   http://www.maxistech.com/


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: java.lang.IllegalStateException: getOutputStream() has already been called for this response

Posted by Vincent Massol <vm...@octo.com>.
Keith,

----- Original Message -----
From: "Keith Cheng" <ke...@maxistech.com>
To: <ca...@jakarta.apache.org>
Sent: Friday, November 23, 2001 5:20 AM
Subject: java.lang.IllegalStateException: getOutputStream() has already been
called for this response


> Dear all,
>
> Finally, I got my taglib test cases running but I got the following error
> after the test:
>
> [EmbeddedCatalinaServiceSX] StandardWrapperValve[JspRedirector]:
> Servlet.service() for servlet JspRedirector threw excep
> tion
> java.lang.IllegalStateException: getOutputStream() has already been called
> for this response

[snip]

>
> The tests finished successfully and anyone know what is this exception
for?
> I am running tomcat 4.0 + JBoss 2.4.3.


I have not seen this error with the standalone Tomcat 4.0 release. I don't
know what it is. What version of Cactus are you using ?

>
> Thanks in advance.
>
> In addition, many people got the java.io.StreamCorruptedException error. I
> had this problem before too and my problem is that I put the context path
in
> JspRedirector servlet mapping like this "/test/jspRedirector.jsp" since
the
> example says: "/somewhere/jspRedirector.jsp".  However, the "/test" should
> be removed since I put the jspRedirector.jsp in the root of my context
path.

yes, this is why there is now a FAQ entry for this subject.

> I suggest that the example should omit the "/somewhere" since it is a bit
> confusing, isn't it?

maybe ... :) I wanted to show that you could put it wherever you wanted. I
wouldn't put in the root directory myself as it would mix with my other
non-test files. Which is why I have put it in /test in the sample
application provided with the cactus distribution.

-Vincent

>
> ---- Keith Cheng
> ---  keithcheng@maxistech.com
> --   http://www.maxistech.com/
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>