title: Migrating JSF Version Error
body: <p>Im trying migrate from JSF 1.2 to JSF 2.0.</p>
  
  <p>I have a little problem. When I start the Tomcat server, it returned the next error: </p>
  
  <p>"java.lang.ClassNotFoundException: com.sun.facelets.FaceletViewHandle"</p>
  
  <p>I have read about this error, and I have changed some lines in my web.xml, but the problem not disappear.</p>
  
  <p>Here is my complete web.xml: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
     &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;grp2&lt;/display-name&gt;
  
  &lt;welcome-file-list&gt;
     &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&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;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;description&gt;
       This parameter tells MyFaces if javascript code should be allowed in
       the rendered HTML output.
       If javascript is allowed, command_link anchors will have javascript   code
       that submits the corresponding form.
       If javascript is not allowed, the state saving info and nested   parameters
      will be added as url parameters.
      Default is 'true'
     &lt;/description&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;description&gt;
      If true, rendered HTML code will be formatted, so that it is 'human-readable'
      i.e. additional line separators and whitespace will be written, that do not
      influence the HTML code.
      Default is 'true'&lt;/description&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;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;description&gt;
       If true, a javascript function will be rendered that is able to restore the
       former vertical scroll on every request. Convenient feature if you have pages
       with long lists and you do not want the browser page to always jump to the top
       if you trigger a link or button action that stays on the same page.
       Default is 'false'
   &lt;/description&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;javax.faces.DEFAULT_SUFFIX&lt;/param-name&gt;
    &lt;param-value&gt;.xhtml&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
    &lt;param-name&gt;com.sun.faces.verifyObjects&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;com.sun.faces.validateXml&lt;/param-name&gt;
    &lt;param-value&gt;true&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
    &lt;description&gt;
          If true, a javascript function will be rendered that is able
          to restore the former vertical scroll on every request.
          Convenient feature if you have pages with long lists and you
          do not want the browser page to always jump to the top if
          you trigger a link or button action that stays on the same
          page. Default: &amp;quot;false&amp;quot;
       &lt;/description&gt;
     &lt;param-name&gt;org.apache.myfaces.AUTO_SCROLL&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;descargas.ficheros.dir&lt;/param-name&gt;
    &lt;param-value&gt;I:/RECURSOS/biblos/ficheros&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
    &lt;param-name&gt;resource.properties.name&lt;/param-name&gt;
    &lt;param-value&gt;resources.properties&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
    &lt;param-name&gt;fichero.pdf.dir&lt;/param-name&gt;
    &lt;param-value&gt;I:/RECURSOS/biblos/ficheros&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;filter&gt;
    &lt;filter-name&gt;LoginFilter&lt;/filter-name&gt;
    &lt;filter-class&gt;
          com.tratecnica.sep.grp.web.filter.LoginFilter
    &lt;/filter-class&gt;
  
    &lt;init-param&gt;
      &lt;param-name&gt;login_page&lt;/param-name&gt;
      &lt;param-value&gt;/index.jsp&lt;/param-value&gt;
    &lt;/init-param&gt;
  &lt;/filter&gt;
  
  &lt;filter-mapping&gt;
    &lt;filter-name&gt;LoginFilter&lt;/filter-name&gt;
    &lt;url-pattern&gt;/grp/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  
  &lt;filter-mapping&gt;
    &lt;filter-name&gt;LoginFilter&lt;/filter-name&gt;
    &lt;url-pattern&gt;/file/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  
  &lt;servlet&gt;
    &lt;servlet-name&gt;LogInitiator&lt;/servlet-name&gt;
    &lt;servlet-class&gt;com.tratecnica.sep.webextensions.servlet.LogInitiator&lt;/servlet-class&gt;
    &lt;init-param&gt;
      &lt;param-name&gt;log4j.config.file&lt;/param-name&gt;
      &lt;param-value&gt;WEB-INF/classes/grp.log4j.xml&lt;/param-value&gt;
    &lt;/init-param&gt;
    &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet&gt;
    &lt;servlet-name&gt;fileServlet&lt;/servlet-name&gt;
    &lt;servlet-  class&gt;com.tratecnica.sep.grp.file.servlet.DownloadFileServlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;fileServlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/file/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;servlet&gt;
    &lt;servlet-name&gt;pdfViewerServlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;com.tratecnica.sep.grp.file.servlet.PdfViewerServlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;pdfViewerServlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/filePDF/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;servlet&gt;
    &lt;servlet-name&gt;GuiServlet&lt;/servlet-name&gt;
    &lt;servlet-class&gt;
          com.tratecnica.sep.grp.web.servlet.GuiServlet
      &lt;/servlet-class&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
    &lt;servlet-name&gt;GuiServlet&lt;/servlet-name&gt;
    &lt;url-pattern&gt;/servlet/GuiServlet&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;error-page&gt;
    &lt;exception-type&gt;java.lang.Exception&lt;/exception-type&gt;
    &lt;location&gt;/grp/error.faces&lt;/location&gt;
  &lt;/error-page&gt;
  
  &lt;error-page&gt;
   &lt;exception-type&gt;
          com.tratecnica.sep.grp.web.ControllerException
   &lt;/exception-type&gt;
   &lt;location&gt;/grp/error.faces&lt;/location&gt;
  &lt;/error-page&gt;
  
  &lt;error-page&gt;
    &lt;exception-type&gt;
          com.tratecnica.sep.grp.data.exception.DataException
    &lt;/exception-type&gt;
    &lt;location&gt;/grp/error.faces&lt;/location&gt;
  &lt;/error-page&gt;
  
  &lt;error-page&gt;
     &lt;exception-type&gt;
          com.tratecnica.sep.crypto.exception.CryptoException
     &lt;/exception-type&gt;
     &lt;location&gt;/grp/error.faces&lt;/location&gt;
  &lt;/error-page&gt;
  
  &lt;error-page&gt;
    &lt;exception-type&gt;javax.servlet.ServletException&lt;/exception-type&gt;
    &lt;location&gt;/grp/error.faces&lt;/location&gt;
  &lt;/error-page&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;/faces/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p></p>
  
  <p>I have always worked with an only JSF version. I have never changed the JSF version. I dont know where is the error.</p>
  
  <p>I need your help.</p>
  
  <p>Thanks for all. </p>