Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2035

Autoscan through ServletInitializer and CDI integration not working in WARs with <absolute-ordering> in web.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.6.2.Final, 4.0.0.Beta6
    • 3.6.1.Final, 4.0.0.Beta5
    • jaxrs
    • None

      We are using <absolute-ordering> in our web.xml. This - as far as I understood the Servlet API Spec - disables autoscanning on all JARs not explicitly mentioned in the <absolute-ordering> section, including scans for Annotations.

      I still want to use RestEasy's autoscan feature, but in order to do that, I have to mention resteasy-servlet-initializer in the <absolute-ordering> section of my web.xml, but since resteasy-servlet-initializer.jar does not contain a web-fragment.xml with a <name> tag (actually: it does not contain any web-fragment.xml at all) I can't do that.

      Similar applies to resteasy-cdi, which has a web-fragment, but does not set the <name> tag on it, so I cannot mention it in our web.xml either. Servlet API Spec (afaik, please correct me if I'm wrong) does not define default names for web-fragments.

      As a final remark: the usage of <others/> in <absolute-ordering> does solve the issue, but this is NOT an option for us.

              rhn-support-asoldano Alessio Soldano
              j-be_jira Juri Berlanda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: