java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet

前端 未结 9 1354
温柔的废话
温柔的废话 2021-02-05 19:14

I am getting this error, when executing JSF and PrimeFaces.

I have included these jars,

  • jsf-api-2.0.3.jar,
  • jsf-impl-2.0.3.jar ,
  • jstl-1.0.
相关标签:
9条回答
  • 2021-02-05 19:49

    I added jsf 2.0 & mojarra 2.0.3-fcs in POM and it fixed my problem.

         <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
    
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.faces</artifactId>
            <version>2.4.0</version>
        </dependency>
    
    0 讨论(0)
  • 2021-02-05 19:52

    I had a similar issue and solved after running Maven Update a couple of times when it finally solved the issue. Running only once was not enough because the jar file was still corrupt so you need to make sure it opens with any compression tool like winzip or gzip.

    0 讨论(0)
  • 2021-02-05 19:53

    Right click on project properties and follow below steps

    "Project Properties" --> "Deployment Assembly", adding "Java Build Path Entries" -> "Maven Dependencies" solves the problem!

    0 讨论(0)
提交回复
热议问题