glassfish
  1. glassfish
  2. GLASSFISH-12991

Certain resources are found by ServletContext but not by DefaultServlet

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.1
    • Fix Version/s: 4.0
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      There is too much code duplication between DefaultServlet and StandardContext to
      look up static resource? I fail to understand why does DefaultServlet not use
      ServletContext.getResource to serve the content? DefaultServlet has a hard
      dependency on WebappClassLoader, which is really bad.

      Because of code duplication, I also see that there are behavioral differences -
      certain resources can be found by ServletContext, but they are never found by
      DefaultServlet. e.g., ServletContext.getResources at the end calls
      classLoader.getResource, but not check to see if the resource actually belonged
      to WEB-INF/lib/*.jar not.

        Activity

        Hide
        Shing Wai Chan added a comment -

        reassign

        Show
        Shing Wai Chan added a comment - reassign
        Hide
        kchung added a comment -

        Code refactoring to these two classes at this stage of release is risky. Also, most of the time, static resources, such as html files are handled by grizzly directly, so fixing DefaultServlet would not really benefit most users. The issue is deferred to 3.2.

        Show
        kchung added a comment - Code refactoring to these two classes at this stage of release is risky. Also, most of the time, static resources, such as html files are handled by grizzly directly, so fixing DefaultServlet would not really benefit most users. The issue is deferred to 3.2.
        Hide
        kchung added a comment -

        Benefit does not justify risk.

        Show
        kchung added a comment - Benefit does not justify risk.

          People

          • Assignee:
            kchung
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: