title: java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener
body: <p>I get the following exception on startup of my JSF web application:</p>
  
  <pre><code>SEVERE: Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
  java.lang.ClassNotFoundException: org.apache.myfaces.webapp.StartupServletContextListener
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3786)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(StandardService.java:516)
      at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
  </code></pre>
  
  <p>This my <code>web.xml</code> file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
   &lt;display-name&gt;J2S&lt;/display-name&gt;
   &lt;context-param&gt;
    &lt;description&gt;State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2&lt;/description&gt;
    &lt;param-name&gt;javax.faces.STATE_SAVING_METHOD&lt;/param-name&gt;
    &lt;param-value&gt;client&lt;/param-value&gt;
   &lt;/context-param&gt;
   &lt;context-param&gt;
    &lt;param-name&gt;javax.servlet.jsp.jstl.fmt.localizationContext&lt;/param-name&gt;
    &lt;param-value&gt;resources.application&lt;/param-value&gt;
   &lt;/context-param&gt;
   &lt;context-param&gt;
    &lt;param-name&gt;org.apache.myfaces.ALLOW_JAVASCRIPT&lt;/param-name&gt;
    &lt;param-value&gt;true&lt;/param-value&gt;
   &lt;/context-param&gt;
   &lt;context-param&gt;
    &lt;param-name&gt;org.apache.myfaces.AUTO_SCROLL&lt;/param-name&gt;
    &lt;param-value&gt;true&lt;/param-value&gt;
   &lt;/context-param&gt;
   &lt;context-param&gt;
    &lt;param-name&gt;org.apache.myfaces.DETECT_JAVASCRIPT&lt;/param-name&gt;
    &lt;param-value&gt;false&lt;/param-value&gt;
   &lt;/context-param&gt;
   &lt;context-param&gt;
    &lt;param-name&gt;org.apache.myfaces.PRETTY_HTML&lt;/param-name&gt;
    &lt;param-value&gt;true&lt;/param-value&gt;
   &lt;/context-param&gt;
   &lt;listener&gt;
    &lt;listener-class&gt;org.apache.myfaces.webapp.StartupServletContextListener&lt;/listener-class&gt;
  &lt;/listener&gt;
   &lt;servlet&gt;
    &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
   &lt;/servlet&gt;
   &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
   &lt;/servlet-mapping&gt;
   &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;*.faces&lt;/url-pattern&gt;
   &lt;/servlet-mapping&gt;
  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt;
   &lt;/servlet-mapping&gt;
   &lt;welcome-file-list&gt;
    welcome-file&gt;index.xhtml&lt;/welcome-file&gt;
   &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>How is this exception caused and how can I solve it?</p>