Could you please tell me what is the solution to this error?
Download the library, try this link .
In the project go to Build Path > Configure Click on Add External Jar and enter the file you have downloaded. In this way you will have added the library you are using and you can use its functions in your Java code.
Since in the image you publish you can see a pom.xml, the correct way to add libraries / dependencies in your project is to edit the pom. Open this file and you should be able to find a <dependencies>
section. If it does not exist, create it. There you will have to add the dependencies to JSF, which are two:
You can find the dependencies in a site such as mvnrepository . Here is an example of how to add the dependencies to JSF of the libraries created by Oracle for JSF 2 in version 2.2.14:
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.2.14</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.14</version>
</dependency>
It is possible that after adding your dependencies you should update the project through maven. For this, you can select your project and press the Alt + F5 keys to force the refresh.
With this, you do not need to add the libraries in the build path of your project or crazy things of that type. The good thing about maven (and similar) is that they make it easier to add the dependencies for you.
I would recommend you to review this site so you can learn more about managing dependencies with maven.