glassfish
  1. glassfish
  2. GLASSFISH-18412

Wrong content type on custom error page through mod_jk

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 4.0_b25
    • Component/s: None
    • Labels:
      None
    • Environment:

      Linux

      Description

      I have a custom 404.html in ../docroot/404.html
      My Glassfish is configured behinde Apache via mod_jk.
      Browsing to a non-existing webapp shows this page nicely.
      BUT browsing to my webapp when it is not working results
      in a web page showing the SOURCE CODE of my 404.html.
      It appears that a HTTP header is wrong in ths particular case.

      See http://www.java.net/forum/topic/glassfish/glassfish/path-custom-default-error-page-resources?force=170

      1. GLASSFISH-18412.patch
        2 kB
        ancoron

        Issue Links

          Activity

          Hide
          Amy Roh added a comment -

          Opened bug 14400809 so the patch can be included in the 3.1.2.x. sustaining release.

          Show
          Amy Roh added a comment - Opened bug 14400809 so the patch can be included in the 3.1.2.x. sustaining release.
          Hide
          tmpsa added a comment -

          I can't find a Glassfish bug with number 14400809 . Is it a typo?

          Also, I just upgraded to Glassfish 3.1.2.2, and the bug is still present.

          Show
          tmpsa added a comment - I can't find a Glassfish bug with number 14400809 . Is it a typo? Also, I just upgraded to Glassfish 3.1.2.2, and the bug is still present.
          Hide
          Amy Roh added a comment -

          Bug 14400809 is our internal bug id for sustaining team so they can include it in the future patch releases. It appears this patch didn't get included in the 3.1.2.2 release. You can use the attached jar for now.

          Show
          Amy Roh added a comment - Bug 14400809 is our internal bug id for sustaining team so they can include it in the future patch releases. It appears this patch didn't get included in the 3.1.2.2 release. You can use the attached jar for now.
          Hide
          tmpsa added a comment -

          The patch works. Thanks!

          Show
          tmpsa added a comment - The patch works. Thanks!
          Hide
          tmpsa added a comment - - edited

          However... One other thing is still not working!

          Custom default pages only work fully when the webapp is accessed via example.com:8080/myapp, NOT via example.com/myapp (i. e. via mod_jk).

          The web page is shown all right, but <img> tags does NOT work. They DO work when the webapp is accessed via example.com:8080/myapp .

          I have a custom default page for 404 and 503. It is defined in the admin console under
          Configurations > server-config > Virtual servers > server > Additional Properties
          as

          Name Value
          -----------------------------------------------------------
          send-error_1 code=404 path=../docroot/fl-unavailable.html
          send-error_2 code=503 path=../docroot/fl-unavailable.html

          fl-unavailable.html and fl-service.jpg are placed in domain1/docroot .

          fl-unavailable.html contains
          <img src="../fl-service.jpg" alt="Service">

          This image is ONLY shown by the browser when the explicit port number is used in the URL.
          It is not a browser issue; I have tried all of them.

          Am I doing it wrong?

          Is this problem related with this bug, or should we open a new bug for it?

          Show
          tmpsa added a comment - - edited However... One other thing is still not working! Custom default pages only work fully when the webapp is accessed via example.com:8080/myapp, NOT via example.com/myapp (i. e. via mod_jk). The web page is shown all right, but <img> tags does NOT work. They DO work when the webapp is accessed via example.com:8080/myapp . I have a custom default page for 404 and 503. It is defined in the admin console under Configurations > server-config > Virtual servers > server > Additional Properties as Name Value ----------------------------------------------------------- send-error_1 code=404 path=../docroot/fl-unavailable.html send-error_2 code=503 path=../docroot/fl-unavailable.html fl-unavailable.html and fl-service.jpg are placed in domain1/docroot . fl-unavailable.html contains <img src="../fl-service.jpg" alt="Service"> This image is ONLY shown by the browser when the explicit port number is used in the URL. It is not a browser issue; I have tried all of them. Am I doing it wrong? Is this problem related with this bug, or should we open a new bug for it?

            People

            • Assignee:
              Amy Roh
              Reporter:
              tmpsa
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: