I have a Maven
project where I tried to add a newer dependency of JSF
after these attempts the project always had errors. I created a new project and copied all classes, pages etc. Now every time I run this project the following exception is thrown:
java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet
The Project is working normally, but I do not know if this error can influence something now or in the future so I would like to resolve it.
Dependency I'm using from JSF:
<!-- Implementação do JSF 2.2 -->
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.faces</artifactId>
<version>2.2.8</version>
<scope>compile</scope>
</dependency>
Web.xml (For the project I had to change the version
from 2.5 to 3.0):
<?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" version="3.0">
<display-name>SistemaSuspensao</display-name>
<welcome-file-list>
<welcome-file>Login.xhtml</welcome-file>
</welcome-file-list>
<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>*.xhtml</url-pattern>
</servlet-mapping>
<context-param>
<description>Quando for atualizar o sistema no datacenter, colocar em Production, e aqui na HR colocar em Development</description>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<context-param>
<param-name>primefaces.THEME</param-name>
<param-value>hot-sneaks</param-value>
</context-param>
<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/Login.xhtml</location>
</error-page>
<session-config>
<session-timeout>-1</session-timeout>
</session-config>
</web-app>