title: ServletContextListener not being invoked
body: <p>I creating a Java EE 7 project using Eclipse Maven plugin. My problem is when I run the application the class that implements SerlvetContextListener does not get invoked. What is causing this problem?</p>
  
  <pre><code>@WebListener
  public class ApplicationContextListener implements ServletContextListener{
  
      @Override
      public void contextInitialized(ServletContextEvent sce)
      {
          Request request = new HttpRequest(sce);
          new Thread (request).start();
          HibernateUtil.getSessionFactory();
      }
  
      @Override
      public void contextDestroyed(ServletContextEvent sce) 
      {
  
      }
  
  }
  </code></pre>
  
  <p>web.xml:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee
           http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"
           version="3.1"&gt;
      &lt;listener&gt;com.kyrogaming.AppServletContextListener&lt;/listener&gt;
      &lt;!-- Jersey Mapping --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;jersey-servlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;com.sun.jersey.spi.container.servlet.ServletContainer&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;com.sun.jersey.config.property.packages&lt;/param-name&gt;
              &lt;param-value&gt;com.kyrogaming.webservices&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/servlet&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;jersey-servlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/service/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;!-- end Jersey Mapping --&gt;
  
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>