title: JSF Project in Eclipse with Maven gives ClassNotFoundException for FacesServlet
body: <p>I've created a Maven project in Eclipse. From "project facets" menu I selected Dynamic Web Module, Java and Java Server Faces. Added some dependencies from pom.xml successfully like jsf-api and servlet-api. Then I wrote a simple Java bean and an xhtml page that uses the bean.</p>
  
  <p>When I build war file with "maven clean install" and deploy it to Tomcat manually, it works as expected. But when I select "Run on Server" from Eclipse it gives the following error:</p>
  
  <pre><code>SEVERE: Servlet /testjsf1 threw load() exception
  java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
          at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1711)
          at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
          at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:525)
          at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:507)
          at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:124)
          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1136)
          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
          at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
          at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
          at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
          at java.util.concurrent.FutureTask.run(FutureTask.java:138)
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
          at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p>It seems jsf libraries are not linked as expected when it is run from Eclipse. Do you have any idea about the cause of this behaviour?</p>