tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6784] New: - may be not a bug , but why is it happenning ?
Date Fri, 01 Mar 2002 13:05:02 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6784>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6784

may be not a bug , but why is it happenning ?

           Summary: may be not a bug , but why is it happenning ?
           Product: Tomcat 4
           Version: 4.0.2 Final
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: esersin@hotmail.com


***** test1.jsp**************
<HTML><HEAD><TITLE>Test RequestDispatcher........</TITLE></HEAD>
<BODY><H3>Test RequestDispatcher........</H3>
Hello..................1.2 JSP SPEC<BR>

<% RequestDispatcher rd = request.getRequestDispatcher("junk.html");
rd.include(request, response); %><BR>
The end!!!!!!!!
</BODY>
</HTML>
************ end test1.jsp **************

*****junk.html*****************
<b><i>Contents inlcuded from junk.html</b></i>
******end junk.html**************

this crashes with the following message:

java.lang.IllegalStateException: getOutputStream() has already been called for 
this response
	at org.apache.catalina.connector.ResponseBase.getWriter
(ResponseBase.java:755)
	at org.apache.catalina.connector.ResponseFacade.getWriter
(ResponseFacade.java:165)
	at org.apache.jasper.runtime.JspWriterImpl.initOut
(JspWriterImpl.java:166)
	at org.apache.jasper.runtime.JspWriterImpl.flushBuffer
(JspWriterImpl.java:158)
	at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:205)
	at org.apache.jasper.runtime.PageContextImpl.release
(PageContextImpl.java:177)
	at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext
(JspFactoryImpl.java:198)
	at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext
(JspFactoryImpl.java:193)
	at org.apache.jsp.test1$jsp._jspService(test1$jsp.java:71)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:202)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:382)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:243)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:190)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2343)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:170)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
	at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:468)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at org.apache.catalina.core.StandardPipeline.invokeNext
(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.connector.http.HttpProcessor.process
(HttpProcessor.java:1012)
	at org.apache.catalina.connector.http.HttpProcessor.run
(HttpProcessor.java:1107)
	at java.lang.Thread.run(Thread.java:484)

here is the servlet
package org.apache.jsp;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class test1$jsp extends HttpJspBase {


    static {
    }
    public test1$jsp( ) {
    }

    private static boolean _jspx_inited = false;

    public final void _jspx_init() throws 
org.apache.jasper.runtime.JspException {
    }

    public void _jspService(HttpServletRequest request, HttpServletResponse  
response)
        throws java.io.IOException, ServletException {

        JspFactory _jspxFactory = null;
        PageContext pageContext = null;
        HttpSession session = null;
        ServletContext application = null;
        ServletConfig config = null;
        JspWriter out = null;
        Object page = this;
        String  _value = null;
        try {

            if (_jspx_inited == false) {
                synchronized (this) {
                    if (_jspx_inited == false) {
                        _jspx_init();
                        _jspx_inited = true;
                    }
                }
            }
            _jspxFactory = JspFactory.getDefaultFactory();
            response.setContentType("text/html;charset=ISO-8859-1");
            pageContext = _jspxFactory.getPageContext(this, request, response,
            			"", true, 8192, true);

            application = pageContext.getServletContext();
            config = pageContext.getServletConfig();
            session = pageContext.getSession();
            out = pageContext.getOut();

            // HTML // begin [file="/test1.jsp";from=(0,0);to=(6,0)]
                out.write("\r\n\r\n<HTML><HEAD><TITLE>Test 
RequestDispatcher........</TITLE></HEAD>\r\n<BODY><H3>Test 
RequestDispatcher........</H3>\r\nHello..................1.2 JSP 
SPEC<BR>\r\n\r\n");

            // end
            // begin [file="/test1.jsp";from=(6,2);to=(7,31)]
                 RequestDispatcher rd = request.getRequestDispatcher
("junk.html");
                rd.include(request, response); 
            // end
            // HTML // begin [file="/test1.jsp";from=(7,33);to=(10,7)]
                out.write("<BR>\r\nThe end!!!!!!!!\r\n</BODY>\r\n</HTML>");

            // end

        } catch (Throwable t) {
            if (out != null && out.getBufferSize() != 0)
                out.clearBuffer();
            if (pageContext != null) pageContext.handlePageException(t);
        } finally {
//following is the line 71
            if (_jspxFactory != null) _jspxFactory.releasePageContext
(pageContext);
        }
    }
}


************
*************
**************

Why it is crashing while container trying to release the pageContext with a 
message
java.lang.IllegalStateException: getOutputStream() has already been called for 
this response"

regards
ersin eser

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


Mime
View raw message