Hi , I get this exception from tc 3.3.2dev:

java.lang.IllegalStateException: getOutputStream() has already been called
        at
org.apache.tomcat.facade.HttpServletResponseFacade.getWriter(HttpServletResp
onseFacade.java:199)
        at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:166)
        at
org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:158)
        at display_11._jspService(display_11.java:148)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java)
        at
org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:570)
        at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
        at org.apache.tomcat.core.Handler.service(Handler.java:235)
        at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:481)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:91
7)
        at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
        at
org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10I
nterceptor.java:176)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:533)
        at java.lang.Thread.run(Thread.java:536)

for this code : ( decompiled from work/.../...class )

                ....
            httpservletresponse.setHeader("Cache-Control", "no-cache");
            httpservletresponse.setHeader("Expires", "0");
            httpservletresponse.setContentType(s1); // s1 depends on the
type of data outputed ( image/gif or text/plain )
            httpservletresponse.setHeader("Content-length",
String.valueOf(abyte0.length));
            httpservletresponse.getOutputStream().write(abyte0);
                }

After this is no output from the jsp, but jasper added an "\n" output to
jspWriter.

The tricky part:

The exception is shown if output TEXT , the TEXT is not outputed.
The exception is NOT SHOWN if i output IMAGE/GIF , but the GIF is!

In both cases the Exception is thrown and logged in stdout.log!

I worked around that problem by outputing texts with out.write() so it does
no longer care, but i think its
a bug in TC..

cu M.Schwarz


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

Reply via email to