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

Log says "JSR-299 injection will be available in Servlets" on Jetty 6, but it is not if jetty-env.xml and jetty-web.xml are missing

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 1.1.2.Final
    • Fix Version/s: 1.1.3.Final
    • Component/s: None
    • Labels:
      None

      Description

      1) Either the log should say "... if jetty-env.xml and jetty-web.xml have been correctly added."
      Or 2) it should check if they are there in the war before stating that injection works on servlets.
      Or 3) - better yet - the system should be improved so the jetty-web.xml thing is obsolete (like on tomcat).

      That log statement was very misleading and it took me quite some time to find out that it was not my jetty6 plugin that was causing the trouble, but that in fact I was missing these bits:
      http://docs.jboss.org/weld/reference/1.1.0.Final/en-US/html_single/#d0e5286

      I've looked into 3), by adding this in org.jboss.weld.environment.jetty.AbstractJettyPre72Container:

               Class<?> weldServletHandlerClass = Reflections.classForName("org.jboss.weld.environment.jetty.WeldServletHandler");
               Method processMethod = weldServletHandlerClass.getMethod("process", WebAppContext.class);
               processMethod.invoke(null, (WebAppContext) WebAppContext.getCurrentWebAppContext());
      

      But that results in 404, because in org.jboss.weld.environment.jetty.WeldServletHandler#WeldServletHandler
      the existingHandler is properly started and the new one is not.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  alesj AleŇ° Justin
                  Reporter:
                  ge0ffrey Geoffrey De Smet
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: