title: Unable to initialize FacesServlet in Tomcat 7 - ClassNotFoundException
body: <p>I am trying out a simple hello world app in JSF but based on the exception thrown by tomcat on start I see that <code>FacesServlet</code> is not getting initialized. I have the required <code>jar</code> files <code>myfaces-api, bundle, impl</code> and commons beanutils, codec, collections, digester, logging. Apart from that I read in another question on SO that I would also required <code>jsf-api.jar and jsf-impl.jar</code> which I also placed in <code>WEB-INF/lib</code> and added to build path</p>
  
  <p>Still no luck. I am developing on Ubuntu, using Eclipse and Tomcat 7</p>
  
  <p>Here is my <code>web.xml</code></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"&gt;
    &lt;display-name&gt;Doom&lt;/display-name&gt;
    &lt;display-name&gt;JavaServerFaces&lt;/display-name&gt;
  
      &lt;!-- Change to "Production" when you are ready to deploy --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;javax.faces.PROJECT_STAGE&lt;/param-name&gt;
          &lt;param-value&gt;Development&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;!-- Welcome page --&gt;
      &lt;welcome-file-list&gt;
          &lt;welcome-file&gt;faces/welcome.xhtml&lt;/welcome-file&gt;
      &lt;/welcome-file-list&gt;
  
      &lt;!-- JSF mapping --&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;!-- Map these files with JSF --&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;*.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;*.xhtml&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>This is the exception </p>
  
  <pre><code>java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1676)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
      at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:415)
      at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:397)
      at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:118)
      at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1062)
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1010)
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4935)
      at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5262)
      at org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5257)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
      at java.util.concurrent.FutureTask.run(FutureTask.java:166)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:724)
  </code></pre>