anchor.diff:     <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
   </listener>
   -------------------------------------------------------------------------------
  -
  -Actually, you don't have to register this listener in Servlet 3.x
  -compliant containers which support
  -`javax.servlet.ServletContainerInitializer` service properly (e.g.
  -Tomcat 7.0.50). In this case
  -`org.jboss.weld.environment.servlet.EnhancedListener` will do all the
  -necessary work automatically, and what is more important - injection
  -into Listeners will work on some containers as well (see <<_tomcat>> and <<_jetty>> for
  -more info).
  -
  -The downside of `javax.servlet.ServletContainerInitializer` approach is
  -that the Weld listener will be added to the end of the ordered list of
  -discovered listeners. In practice the request and session context will
  -not be active during `ServletRequestListener` and `HttpSessionListener`
  -notifications. Fortunately, it's possible to combine the
  -`EnhancedListener` and the old `Listener` to fix this problem - simply
  -add the old `Listener` to the `web.xml` as mentioned above. Note that it
  -must be defined before the listeners using request and session context.
   
   NOTE: There is quite a special use-case where one more special component must
   be involved. If you want the session context to be active during
  
positive.code: 
  ==== Tomcat
  
  Since version 2.2.0.Final only Tomcat 7 and 8 are supported.
  
  Tomcat has a read-only JNDI, so Weld can't automatically bind the
  BeanManager extension SPI. To bind the BeanManager into JNDI, you should
  populate `META-INF/context.xml` in the web root with the following
  
negative.code: Tomcat only allows you to bind entries to `java:comp/env`, so the
  BeanManager will be available at `java:comp/env/BeanManager`
  
  ===== Embedded Tomcat
  
  With embedded Tomcat it is necessary to register Weld's listener programmatically:
  
  [source.JAVA, java]
  -------------------------------------------------------------
  public class Main {
  
      public static void main(String[] args) throws ServletException, LifecycleException {
          Tomcat tomcat = new Tomcat();
          Context ctx = tomcat.addContext("/", new File("src/main/resources").getAbsolutePath());
  
          Tomcat.addServlet(ctx, "hello", HelloWorldServlet.class.getName());
          ctx.addServletMapping("/*", "hello");
  
          // ctx.addApplicationListener(Listener.class.getName()); # <1>
  
          tomcat.start();
          tomcat.getServer().await();
      }
  
      public static class HelloWorldServlet extends HttpServlet {
  
          @Inject
          private BeanManager manager;
  
          @Override
          protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
              resp.setContentType("text/plain");
              resp.getWriter().append("Hello from " + manager);
          }
      }
  }
  -------------------------------------------------------------
  <1> Weld's `org.jboss.weld.environment.servlet.Listener` registered programmatically
  
  ==== Jetty
  
  Since version 2.0.2.Final only Jetty 7, 8 and 9 are supported.
  
  Weld supports context activation/deactivation and dependency
  injection into Servlets and Filters. Injection into Servlet listeners works on
  Jetty 9.1.1 and newer. This is done automatically for the most part.
  
  Since Jetty 8 the class `org.eclipse.jetty.servlet.ServletContextHandler.Decorator`
  is not visible from the web application. Therefore, one more step is required -
  we have to tell Jetty not to hide this system class.
  
  Simply place the following `jetty-context.xml` file in the WEB-INF dir:
  
  [source.XML, xml]
  -------------------------------------------------------------
  <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
  <Configure class="org.eclipse.jetty.webapp.WebAppContext">
      <Set name="serverClasses">
          <Array type="java.lang.String">
              <Item>-org.eclipse.jetty.servlet.ServletContextHandler.Decorator</Item>
          </Array>
      </Set>
  </Configure>
  -------------------------------------------------------------
  
  See also http://www.eclipse.org/jetty/documentation/current/jetty-classloading.html#setting-server-classes[Jetty Classloading documentation].
  
  ===== Binding BeanManager to JNDI
  
  To bind the BeanManager into JNDI, you should either populate
  `WEB-INF/jetty-env.xml` with the following contents:
  