Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To see PrimeFaces render in an existing Jakarta Faces application: add the PrimeFaces dependency, declare its XHTML namespace, then put a component such as <p:spinner /> in the page. First match the library version to your project’s Faces stack; a Jakarta dependency and legacy javax.* namespaces are not interchangeable.

Before you start

This quick start assumes you already have a working Jakarta Faces application and runtime, plus a Maven build. It adds PrimeFaces to that application; it does not scaffold a project or configure an application server. PrimeFaces supplies UI component tags for Jakarta Faces views. Its official Getting Started documentation describes it as “a lightweight library with one jar, zero-configuration and no required dependencies.”

Choose the PrimeFaces line that matches your Faces stack

Check the Faces API and runtime already used by the project before selecting a PrimeFaces dependency. The project repository lists separate lines for current Jakarta applications and legacy Java EE applications:

Project stack PrimeFaces version listed by the project Namespace family Status or qualification
Jakarta EE, Faces 4.0+ 16.0.0 jakarta.* Current Jakarta line
Legacy Java EE, JSF 2.3 15.0.18 javax.* Security updates only

These version and compatibility details are from the PrimeFaces project repository; check it for current release information before copying coordinates into a new project. Do not combine a Jakarta PrimeFaces release with legacy javax.* APIs, or a legacy release with Jakarta namespaces.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Add PrimeFaces to a Jakarta Faces project

1. Add the stable dependency

For a Jakarta EE project using Faces 4.0 or later, add the stable release coordinate listed by the project to the Maven <dependencies> section in pom.xml:

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>16.0.0</version>
</dependency>

Do not copy 17.0.0-SNAPSHOT from the showcase’s displayed Maven example as though it were a stable release: it is a snapshot. Use the project repository’s release listing to confirm the stable version that fits your stack.

2. Declare the XHTML namespaces and add a component

In a Jakarta Faces XHTML view, use the PrimeFaces namespace together with the Jakarta Faces HTML and core namespaces. The official showcase demonstrates this page and spinner smoke test:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="jakarta.faces.html"
      xmlns:f="jakarta.faces.core"
      xmlns:p="primefaces">
  <h:head />
  <h:body>
    <p:spinner />
  </h:body>
</html>

Save the file as an XHTML view within the running application. The p prefix is bound to primefaces, so <p:spinner /> is resolved as a PrimeFaces component tag rather than ordinary HTML.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Run the smoke test and interpret the result

Deploy or run the application using its existing Jakarta Faces setup, then open the XHTML view in a browser. If the spinner renders, the application has resolved this PrimeFaces component in that page. This is a useful first check, not a complete validation of production configuration, deployment, or every component.

  • If the view fails to resolve the p tags, confirm that the PrimeFaces dependency was added to the application being deployed and that the view declares xmlns:p="primefaces".
  • If the project uses legacy JSF 2.3, do not use the Jakarta example unchanged. Select the matching legacy library line and its javax.* APIs and view namespaces.
  • If an older tutorial shows different coordinates or namespace declarations, verify its version and JSF assumptions against the project’s current release guidance before applying it.

The official PrimeFaces showcase provides the current setup syntax and component examples.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.