Im trying migrate from JSF 1.2 to JSF 2.0.
I have a little problem. When I start the Tomcat server, it returned the next error:
"java.lang.ClassNotFoundException: com.sun.facelets.FaceletViewHandle"
I have read about this error, and I have changed some lines in my web.xml, but the problem not disappear.
Here is my complete web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<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">
<display-name>grp2</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<context-param>
<param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>
<param-value>resources.application</param-value>
</context-param>
<context-param>
<description>State saving method: 'client' or 'server' (=default). See JSF Specification 2.5.2</description>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>client</param-value>
</context-param>
<context-param>
<description>
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'
</description>
<param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>
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'</description>
<param-name>org.apache.myfaces.PRETTY_HTML</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>org.apache.myfaces.DETECT_JAVASCRIPT</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<description>
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'
</description>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>javax.faces.DEFAULT_SUFFIX</param-name>
<param-value>.xhtml</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.verifyObjects</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
<param-value>true</param-value>
</context-param>
<context-param>
<description>
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: "false"
</description>
<param-name>org.apache.myfaces.AUTO_SCROLL</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>descargas.ficheros.dir</param-name>
<param-value>I:/RECURSOS/biblos/ficheros</param-value>
</context-param>
<context-param>
<param-name>resource.properties.name</param-name>
<param-value>resources.properties</param-value>
</context-param>
<context-param>
<param-name>fichero.pdf.dir</param-name>
<param-value>I:/RECURSOS/biblos/ficheros</param-value>
</context-param>
<filter>
<filter-name>LoginFilter</filter-name>
<filter-class>
com.tratecnica.sep.grp.web.filter.LoginFilter
</filter-class>
<init-param>
<param-name>login_page</param-name>
<param-value>/index.jsp</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>LoginFilter</filter-name>
<url-pattern>/grp/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>LoginFilter</filter-name>
<url-pattern>/file/*</url-pattern>
</filter-mapping>
<servlet>
<servlet-name>LogInitiator</servlet-name>
<servlet-class>com.tratecnica.sep.webextensions.servlet.LogInitiator</servlet-class>
<init-param>
<param-name>log4j.config.file</param-name>
<param-value>WEB-INF/classes/grp.log4j.xml</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>fileServlet</servlet-name>
<servlet- class>com.tratecnica.sep.grp.file.servlet.DownloadFileServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>fileServlet</servlet-name>
<url-pattern>/file/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>pdfViewerServlet</servlet-name>
<servlet-class>com.tratecnica.sep.grp.file.servlet.PdfViewerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>pdfViewerServlet</servlet-name>
<url-pattern>/filePDF/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>GuiServlet</servlet-name>
<servlet-class>
com.tratecnica.sep.grp.web.servlet.GuiServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>GuiServlet</servlet-name>
<url-pattern>/servlet/GuiServlet</url-pattern>
</servlet-mapping>
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/grp/error.faces</location>
</error-page>
<error-page>
<exception-type>
com.tratecnica.sep.grp.web.ControllerException
</exception-type>
<location>/grp/error.faces</location>
</error-page>
<error-page>
<exception-type>
com.tratecnica.sep.grp.data.exception.DataException
</exception-type>
<location>/grp/error.faces</location>
</error-page>
<error-page>
<exception-type>
com.tratecnica.sep.crypto.exception.CryptoException
</exception-type>
<location>/grp/error.faces</location>
</error-page>
<error-page>
<exception-type>javax.servlet.ServletException</exception-type>
<location>/grp/error.faces</location>
</error-page>
<listener>
<listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
I have always worked with an only JSF version. I have never changed the JSF version. I dont know where is the error.
I need your help.
Thanks for all.