glassfish
  1. glassfish
  2. GLASSFISH-4792

Honor context-root in sun-web.xml even if web module in bundled in EAR file

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: V3
    • Fix Version/s: not determined
    • Component/s: deployment
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: Sun

    • Issuezilla Id:
      4,792

      Description

      vbkraemer wrote (see http://forums.java.net/jive/thread.jspa?messageID=269540
      for complete background):

      The context-root of a web app deployed inside an ear is determined by:

      1. the value of the context-root element in the ear file's
      sun-application.xml file
      2. the value of context-root element in the ear file's application.xml
      3. the default value computed by using the module's web-uri...

      (in order)

      Adding a forth method of determining the context-root, that requires
      introspection of a second level of archived content, may have seemed
      like overkill to the implementors.

      Honoring the context-root specified in a web module's sun-web.xml regardless of
      whether the web module is deployed on its own, or as part of an EAR, would be a
      good idea. This would allow for the web module to simply be "dropped" into an
      EAR (and have its context-root take effect), without having to edit any
      sun-application.xml or application.xml.

        Activity

        jluehe created issue -
        Hide
        Hong Zhang added a comment -

        Jan: this is actually not an implementation issue. I am afraid honoring the
        sun-web.xml context root values will violate the spec. For the ear case:

        1. When there is application.xml present, as the context roots for web modules
        are required elements for application.xml according to the schema, the context
        roots will always be defined there. And they will over-shadow any values in
        sun-web.xml.

        2. When there is no application.xml present, according to the EE spec, the
        context roots will be computed using the sub modules web uri, and there is no
        chance for the context root from sun-web.xml to be used either.

        Let me know what you think.

        Show
        Hong Zhang added a comment - Jan: this is actually not an implementation issue. I am afraid honoring the sun-web.xml context root values will violate the spec. For the ear case: 1. When there is application.xml present, as the context roots for web modules are required elements for application.xml according to the schema, the context roots will always be defined there. And they will over-shadow any values in sun-web.xml. 2. When there is no application.xml present, according to the EE spec, the context roots will be computed using the sub modules web uri, and there is no chance for the context root from sun-web.xml to be used either. Let me know what you think.
        Hide
        vince kraemer added a comment -

        The spec doesn't take the vendor specific extensions into account.

        The user can override the context-root specified in the application.xml with
        data in the sun-application.xml. That feature appears to be spec compliant.

        I think the spec creates an enclosure in which we can and do define extended
        behavior. We need to be able to handle apps that are spec pure purely.

        But an ear that contains a web-app that includes a sun-web.xml is not spec pure,
        so our extensions should behave consistently.

        Show
        vince kraemer added a comment - The spec doesn't take the vendor specific extensions into account. The user can override the context-root specified in the application.xml with data in the sun-application.xml. That feature appears to be spec compliant. I think the spec creates an enclosure in which we can and do define extended behavior. We need to be able to handle apps that are spec pure purely. But an ear that contains a web-app that includes a sun-web.xml is not spec pure, so our extensions should behave consistently.
        kenaiadmin made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 4792 36396
        Hide
        Tom Mueller added a comment -

        Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.

        Show
        Tom Mueller added a comment - Bulk update to change fix version to "not determined" for all issues still open but with a fix version for a released version.
        Tom Mueller made changes -
        Fix Version/s not determined [ 11149 ]
        Fix Version/s V3 [ 10981 ]

          People

          • Assignee:
            Hong Zhang
            Reporter:
            jluehe
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: