Jetty
  1. Jetty
  2. JETTY-58

Exception while reporting error in JSP page

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0beta14
    • Fix Version/s: 6.0.0beta15
    • Component/s: JSP
    • Labels:
      None
    • Number of attachments :
      0

      Description

      7215563 [BoundedThreadPool0-1] ERROR org.mortbay.log - /isp/admin/data/index.jsp
      java.lang.IllegalStateException: STREAM
      at org.mortbay.jetty.Response.getWriter(Response.java:459)
      at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:124)
      at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:117)
      at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:203)
      at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:113)
      at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:74)
      at org.apache.jsp.admin.data.index_jsp._jspService(index_jsp.java:76)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:285)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:239)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:423)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:350)
      at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:221)
      at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:539)
      at org.mortbay.jetty.Server.handle(Server.java:341)
      at org.mortbay.jetty.Server.handle(Server.java:311)
      at org.mortbay.jetty.HttpConnection.doHandler(HttpConnection.java:355)
      at org.mortbay.jetty.HttpConnection.access$1500(HttpConnection.java:38)
      at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:598)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:487)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:196)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:293)
      at org.mortbay.jetty.nio.SelectChannelConnector$HttpEndPoint.run(SelectChannelConnector.java:710)
      at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:412)

      public PrintWriter getWriter() throws IOException
      {
      if (_outputState==DISABLED)
      return __nullPrintWriter;

      if (_outputState!=NONE && _outputState!=WRITER)
      throw new IllegalStateException("STREAM");

        Activity

        Hide
        Igor A Tarasov added a comment -

        This happen while call to <jsp:include> with none <jsp:param> and in called page try to call request.getParameter*()

        Error Example:

        ------- page1.jsp ---------
        <jsp:include page="page2.jsp"/>

        ------ page2.jsp ----------
        <% request.getParametr("myparametr"); %>

        or

        <% request.getParametrMap(); %>

        this cause java.lang.IllegalStateException: STREAM while doing in generated .java-file:
        } finally

        { if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context); }

        To temporary resolve this problem, any parameters must be included in call:

        ------- page1.jsp ---------
        <jsp:include page="page2.jsp">
        <jsp:param name="dummy_parameter" value="unneded value"/>
        </jsp:include>

        Show
        Igor A Tarasov added a comment - This happen while call to <jsp:include> with none <jsp:param> and in called page try to call request.getParameter*() Error Example: ------- page1.jsp --------- <jsp:include page="page2.jsp"/> ------ page2.jsp ---------- <% request.getParametr("myparametr"); %> or <% request.getParametrMap(); %> this cause java.lang.IllegalStateException: STREAM while doing in generated .java-file: } finally { if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context); } To temporary resolve this problem, any parameters must be included in call: ------- page1.jsp --------- <jsp:include page="page2.jsp"> <jsp:param name="dummy_parameter" value="unneded value"/> </jsp:include>
        Hide
        Igor A Tarasov added a comment -

        Previois bug JETTY-57 seems the same, but with other exception.

        Show
        Igor A Tarasov added a comment - Previois bug JETTY-57 seems the same, but with other exception.
        Hide
        Greg Wilkins added a comment -

        This issue is fixed.

        the problem is that you had type parametr instead of parameter in your JSP
        But in beta14, the resource bundle to report this error was in the wrong spot. So youjust
        got the error while trying to report the real error.

        Show
        Greg Wilkins added a comment - This issue is fixed. the problem is that you had type parametr instead of parameter in your JSP But in beta14, the resource bundle to report this error was in the wrong spot. So youjust got the error while trying to report the real error.

          People

          • Assignee:
            Unassigned
            Reporter:
            Igor A Tarasov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: