Error JSF, I created my project in eclipse and I get this error

0

Could you please tell me what is the solution to this error?

    
asked by user29102 01.02.2017 в 17:32
source

2 answers

1

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.

    
answered by 01.02.2017 в 23:45
1

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:

  • Definition of JSF
  • Implementation of JSF
  • 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.

        
    answered by 02.02.2017 в 13:31