Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-906

Jetty 7.2+ container incorrectly identified as Jetty 7 container

    XMLWordPrintable

Details

    Description

      Weld-servlet can identify a jetty 7.3 or 7.4 environment as a Jetty 7.0 environment
      (similar problem to WELD-879 but for Jetty not tomcat)

      In Listener.java it checks for a Jetty 7 container before checking for a Jetty 7.2+ container. The version 7 check looks for the presence of org.eclipse.jetty.servlet.ServletHandler which is present (but not necessarily visible) in all jetty 7.x environments. By default this class won't be found in Jetty 7.2+, but in this case Weld won't actually work. To run Weld under Jetty 7.2+ you need to expose some of the server classes that are normally hidden, and if you don't explicitly exclude the ServletHandler class the environment is detected as Jetty 7 not 7.2+

      The suggested fix would be to reverse the order in which containers are checked and check for JettyPost72Container before checking for JettyContainer

      You can work around this issue by using META-INF/services to specify container or setting the ServletHandler class as a server class so that the web app can't see it

      Attachments

        Activity

          People

            ajustin@redhat.com Ales Justin
            bpsommerville Ben Sommerville (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: