title: Facelets tab lib not recognised by Eclipse/Tomcat 6
body: <p>I included this in my index.jsp JSF file:</p>
  
  <pre><code>&lt;%@ taglib prefix="ui" uri="http://java.sun.com/jsf/facelets"%&gt;
  </code></pre>
  
  <p>and Eclipse underlines the URL, hovering gives this:</p>
  
  <pre><code>Cannot find the tag library descriptor for "http://java.sun.com/jsf/facelets"
  </code></pre>
  
  <p>Deploying and trying to start Tomcat 6 using the Tomcat plugin causes this:</p>
  
  <pre><code>|STDOUT| 2010-03-03 17:57:29,872 | INFO  | [main]: Serialization provider : class org.apache.myfaces.shared_impl.util.serial.DefaultSerialFactory
      |STDOUT| 2010-03-03 17:57:29,904 | INFO  | [main]: ServletContext 'C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\myapp\' initialized.
      |STDOUT| 2010-03-03 17:57:29,904 | INFO  | [main]: Checking for plugins:org.apache.myfaces.FACES_INIT_PLUGINS
      03-Mar-2010 17:57:29 org.apache.catalina.core.StandardContext start
      SEVERE: Error listenerStart
      03-Mar-2010 17:57:29 org.apache.catalina.core.StandardContext start
      SEVERE: Context [/myapp] startup failed due to previous errors
  </code></pre>
  
  <p>...</p>
  
  <pre><code>03-Mar-2010 17:57:30 com.sun.faces.config.ConfigureListener contextDestroyed
  SEVERE: Unexpected exception when attempting to tear down the Mojarra runtime
  java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.application.ApplicationFactory
      at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:804)
  </code></pre>
  
  <p>My web.xml contains this</p>
  
  <pre><code>&lt;listener&gt;
      &lt;listener-class&gt;com.sun.faces.config.ConfigureListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <p>My face-config.xml contains this</p>
  
  <pre><code>    &lt;application&gt;
      &lt;!-- tell JSF to use Facelets --&gt;
      &lt;view-handler&gt;com.sun.facelets.FaceletViewHandler&lt;/view-handler&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p>And my application build has the latest JSF 2.0.2 jsf-api.jar and jsf-impl.jar.  I've also got MyFaces 1.2.8 and all the latest commons jars.  The app was building fine til I upgraded JSF.  I would at least expect a run time error but here Eclipse cannot see the taglib.  What else could I be missing?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>For full information - I took out Mojarra and left in Myfaces.  This meant I needed to remove this from my <code>web.xml</code>:</p>
  
  <pre><code>&lt;listener&gt;
          &lt;listener-class&gt;com.sun.faces.config.ConfigureListener&lt;/listener-class&gt;
      &lt;/listener&gt; 
  </code></pre>
  
  <p>and replace it with the equivalent for myfaces:</p>
  
  <pre><code>&lt;listener&gt;
    &lt;listener-class&gt;org.apache.myfaces.webapp.StartupServletContextListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <p>Thanks</p>