glassfish
  1. glassfish
  2. GLASSFISH-6725

Junk screen is seen if compression is used for output and the included servet&jsp throws an exception

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 9.1peur2
    • Fix Version/s: 9.1.1_dev
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      6,725
    • Status Whiteboard:
      Hide

      911ToScrub

      Show
      911ToScrub

      Description

      We are facing "Big Screen of Junk" issue on
      WebSynergy(http://portal.dev.java.net) . When the portlet's jsp throws a runtime
      exception, it results in a junk screen. In order to provide a reproducible test
      case, i have created a small application, that mimics issue that websynergy is
      facing. The issue in summary..
      WebApp1 includes a servlet from WebApp2. This servlet in turn includes a JSP.
      WebApp1 writes the output obtained from the WebApp2 to the browser with
      "accept-encoding" set to "gzip". If the JSP throws a runtime exception, the
      content on the browser will be junk characters, but if the "accept-encoding" NOT
      set to "gzip" in WebApp1, i see proper content on the browser.

      Brief explanation about the sample application. I have attached three NetBeans
      projects.
      1. BSOJCompressionOutTest - a web application (WebApp1 mentioned above, mimics
      portal webapp)
      2. BSOJIncludedServletApp - a web application (WebApp2 mentioned above, mimics
      portlet webapp)
      3. BSOJReqResWrapper - is a project that has wrappers for request and response.

      Setup:
      1. Copy BSOJReqResWrapper.jar to glassfish/domains/domain1/lib
      2. Copy BSOJCompressionOutTest.war and BSOJIncludedServletApp.war
      glassfish/domains/domain1/autodeploy
      3. Restart glassfish

      Test:
      If you access the below url, you will see screen with junk characters(attached
      screen shot - error.jpg)
      http://localhost:8080/BSOJCompressionOutTest/compress

      If you access the below url, you will see proper content(attached screen shot -
      noerror.jpg)
      http://localhost:8080/BSOJCompressionOutTest/compress?nocompress=true

      I have marked this P1, because when we get junk characters, it leads to bad user
      experience for the users of websynergy. This also affects liferay on glassfish.

      1. issue6725_FINAL_patch_20081106.jar
        4 kB
        jfarcand
      2. issue6725_FINAL_patch_20081107.jar
        15 kB
        jfarcand
      3. issue6725_patch_20081106.jar
        4 kB
        jfarcand
      1. error.jpg
        40 kB
      2. noerror.jpg
        37 kB

        Activity

        Hide
        jfarcand added a comment -

        OK, attaching the fix. Will wait for a review and then commit.

        Show
        jfarcand added a comment - OK, attaching the fix. Will wait for a review and then commit.
        Hide
        jfarcand added a comment -

        Created an attachment (id=2081)
        FINAL FIX

        Show
        jfarcand added a comment - Created an attachment (id=2081) FINAL FIX
        Hide
        jfarcand added a comment -

        Created an attachment (id=2086)
        Add the proper classes to the patch (ApplicationDispatcher)

        Show
        jfarcand added a comment - Created an attachment (id=2086) Add the proper classes to the patch (ApplicationDispatcher)
        Hide
        jfarcand added a comment -

        Fixed

        Checking in ApplicationDispatcher.java;
        /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/core/ApplicationDispatcher.java,v
        <-- ApplicationDispatcher.java
        new revision: 1.17.6.2; previous revision: 1.17.6.1
        done

        Show
        jfarcand added a comment - Fixed Checking in ApplicationDispatcher.java; /cvs/glassfish/appserv-webtier/src/java/org/apache/catalina/core/ApplicationDispatcher.java,v <-- ApplicationDispatcher.java new revision: 1.17.6.2; previous revision: 1.17.6.1 done
        Hide
        dgothe added a comment -

        Thanks Jeanfrancois for the quick help. The new patch works fine.

        Show
        dgothe added a comment - Thanks Jeanfrancois for the quick help. The new patch works fine.

          People

          • Assignee:
            jfarcand
            Reporter:
            dgothe
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: