Add Primefaces to the project

0

What is the procedure (step by step) for me to add primefaces to my project? I already have the jar on the machine, but is this jar inside the Maven dependencies? do I have to make changes to the web.xml and pom?

    
asked by anonymous 12.08.2016 / 15:39

1 answer

0

You do not need to download 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 do not need to change anything on your web.xml . To use the components in XHTML , just declare 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">
    
12.08.2016 / 15:44