title: Tomcat, WELD 3, CDI 2, WeldTerminalListener
body: <p>Trying to set up a maven web project with CDI 2.0 which should run on Tomcat 8.5. So I have to install the jboss WELD 3. </p>
  
  <p><a href="http://weld.cdi-spec.org/documentation/#9" rel="nofollow noreferrer">What is the relation between Weld, CDI and Java EE versions?</a></p>
  
  <p>With the POM declaration out of here (only "weld-servlet-core")...</p>
  
  <p><a href="http://docs.jboss.org/weld/reference/latest-master/en-US/html/environments.html#weld-servlet" rel="nofollow noreferrer">WELD - POM declaration (docs.jboss.org)</a></p>
  
  <p>I get an Error with the "WeldTerminalListener", declared in the web.xml like that:</p>
  
  <pre><code>&lt;!-- This listener should always be the last registered listener --&gt;
  &lt;listener&gt;
      &lt;listener-class&gt;org.jboss.weld.servlet.WeldTerminalListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <p>ERROR: java.lang.ClassNotFoundException: org.jboss.weld.servlet.WeldTerminalListener</p>
  
  <hr>
  
  <p>If I use the following POM declaration it works fine:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;org.jboss.weld.servlet&lt;/groupId&gt;
    &lt;artifactId&gt;weld-servlet&lt;/artifactId&gt;
    &lt;version&gt;2.3.5.Final&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <hr>
  
  <p>weld-servlet (without "-core") 3 is only available as alpha. The Version 2 is not CDI 2.0 able.</p>
  
  <p>So which dependency in the POM do I need, to get it run?</p>