Please note, this is a STATIC archive of website www.javatpoint.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
Javatpoint Logo
Javatpoint Logo

PrimeFaces Configuration

Download JAR

To configure primefaces in our JSF application, we need to download only one JAR file primefaces-{version}.jar. We can manually download it from the official site of primfaces.

If we want to use it in maven project, we can add the following dependency in our pom.xml file.

Note: In NetBeans IDE, primefaces is included by default. We don't need to download it manually.

Prerequisites

Mandatory dependencies: These are required to execute application.

Java - Java 6 or higher

JSF - JSF 2.0 or higher

Optional dependencies: These are not required but may be used to get custom features.

Dependency Description
commons-fileupload, commons-io It is used to upload files.
atmosphere It is used for Push support.
barcode4j-light It is used for barcode.
itext It is used to export PDF document.

After adding dependencies, let's create an application. This example includes the following steps.

Create a project

PrimeFaces Configuration 1

Provide project name.

PrimeFaces Configuration 2

Select server and J2EE version.

PrimeFaces Configuration 3

Select framework JSF and primeface Library.

PrimeFaces Configuration 4

Click on the finish, it will create a web application. The project structure looks like this:

PrimeFaces Configuration 5

This project contains default index.xhtml file. After running this index file, it produces the following output.

PrimeFaces Configuration 6

This page is redirect to welcomePrimefaces.xhtml that produces output like this:

PrimeFaces Configuration 7
Next TopicPrimeFaces Ajax





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA