Add Primefaces to the project

Asked

Viewed 320 times

1

What is the procedure (step by step) for me to add the first faces to my project? I already have the jar in the machine, but this jar it stays inside the Maven dependencies? I have to make which changes to web.xml and pom?

1 answer

1

No need to lower the jar on your PC. Just include the following dependencies in your pom.xml (the theme is optional):

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>5.3</version>
    <scope>compile</scope>
</dependency>
<dependency>
    <groupId>org.primefaces.themes</groupId>
    <artifactId>all-themes</artifactId>
    <version>1.0.10</version>
</dependency>

You don’t need to change anything in yours web.xml. To use the components in the XHTML, just state it in the header:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
  • It didn’t work, the project runs but without the first faces

  • Is there any log to see?

  • So, I again configured the project to receive the Maven, with this he downloaded the jar dependencies, including the prime faces, ai rodei e funciona...valeu Victor

  • Beauty, don’t forget to mark the answer as correct. Abs

  • how do I do? just click on the up arrow? rsrsr yours is not new in this trein here kkk

Browser other questions tagged

You are not signed in. Login or sign up in order to post.