Skip to content

Jakarta EE

Jakarta EE 10 and 11: component versions, deployment descriptor headers, Faces namespaces and a multi-module project layout.

4 min readUpdated

Jakarta EE is the Eclipse Foundation’s continuation of Java EE. Since Jakarta EE 9 the APIs live in jakarta.* packages instead of javax.*, and since Jakarta EE 10 the Faces and JSTL taglibs use short URNs instead of xmlns.jcp.org URLs.

This note lists the component versions of Jakarta EE 10 and 11, the matching headers for each deployment descriptor, the namespace history of Faces, and a typical EAR project layout.

Component versions

Component Jakarta EE 10 Jakarta EE 11
Java SE 11 / 17 17 / 21
Faces 4.0 4.1
Expression Language 5.0 6.0
Servlet 6.0 6.1
CDI 4.0 4.1
WebSocket 2.1 2.2
Persistence (JPA) 3.1 3.2
Facelets taglib schema 4.0 4.1
GlassFish 7.x 8.x

The Java SE row gives the minimum and the newer supported version.

Deployment descriptor headers

Each descriptor declares its schema and version in the root element. Copy the header for your platform version and keep the rest of the file. All schemas are listed on the Jakarta EE XML schemas page.

Jakarta EE 11

Faces, faces-config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_4_1.xsd"
version="4.1">

Servlet, web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_1.xsd"
version="6.1">

CDI, beans.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_1.xsd"
version="4.1"
bean-discovery-mode="all">

Persistence, persistence.xml:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_2.xsd"
version="3.2">

Facelets tag library, *.taglib.xml:

<?xml version="1.0" encoding="UTF-8"?>
<facelet-taglib xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facelettaglibrary_4_1.xsd"
version="4.1">

Web fragment, web-fragment.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-fragment xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-fragment_6_1.xsd"
version="6.1">

Jakarta EE 10

Faces, faces-config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<faces-config xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facesconfig_4_0.xsd"
version="4.0">

Servlet, web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd"
version="6.0">

CDI, beans.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/beans_4_0.xsd"
version="4.0"
bean-discovery-mode="all">

Persistence, persistence.xml. Jakarta Persistence 3.1 did not publish a new schema, so it uses the 3.0 schema, whose version attribute is fixed to 3.0:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence xmlns="https://jakarta.ee/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/persistence https://jakarta.ee/xml/ns/persistence/persistence_3_0.xsd"
version="3.0">

Facelets tag library, *.taglib.xml:

<?xml version="1.0" encoding="UTF-8"?>
<facelet-taglib xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-facelettaglibrary_4_0.xsd"
version="4.0">

Web fragment, web-fragment.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-fragment xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-fragment_6_0.xsd"
version="6.0">

Faces and JSTL namespaces

Faces 4.0 (Jakarta EE 10) replaced the taglib URLs with URNs. The Java package changed one release earlier, in Jakarta EE 9.

Platform Faces version Java package Taglib namespace
J2EE 1.4 JSF 1.0–1.1 javax.faces.* http://java.sun.com/jsf/*
Java EE 5 JSF 1.2 javax.faces.* http://java.sun.com/jsf/*
Java EE 6 JSF 2.0–2.1 javax.faces.* http://java.sun.com/jsf/*
Java EE 7 JSF 2.2 javax.faces.* http://xmlns.jcp.org/jsf/*
Java EE 8 JSF 2.3 javax.faces.* http://xmlns.jcp.org/jsf/*
Jakarta EE 8 JSF 2.3 javax.faces.* http://xmlns.jcp.org/jsf/*
Jakarta EE 9 Faces 3.0 jakarta.faces.* http://xmlns.jcp.org/jsf/*
Jakarta EE 10 Faces 4.0 jakarta.faces.* jakarta.faces.*
Jakarta EE 11 Faces 4.1 jakarta.faces.* jakarta.faces.*

When migrating pages to Jakarta EE 10 or later, replace each old URI with its URN:

Old URI New URN
http://xmlns.jcp.org/jsf jakarta.faces
http://xmlns.jcp.org/jsf/facelets jakarta.faces.facelets
http://xmlns.jcp.org/jsf/core jakarta.faces.core
http://xmlns.jcp.org/jsf/html jakarta.faces.html
http://xmlns.jcp.org/jsf/passthrough jakarta.faces.passthrough
http://xmlns.jcp.org/jsf/composite jakarta.faces.composite
http://xmlns.jcp.org/jsf/component jakarta.faces.component
http://xmlns.jcp.org/jsp/jstl/core jakarta.tags.core
http://xmlns.jcp.org/jsp/jstl/fmt jakarta.tags.fmt
http://xmlns.jcp.org/jsp/jstl/functions jakarta.tags.functions

A Facelets page that declares all Faces namespaces with the usual prefixes:

<html
xmlns:faces="jakarta.faces"
xmlns:ui="jakarta.faces.facelets"
xmlns:f="jakarta.faces.core"
xmlns:h="jakarta.faces.html"
xmlns:pt="jakarta.faces.passthrough"
xmlns:cc="jakarta.faces.composite"
xmlns:my="jakarta.faces.component"
>
...
</html>

jakarta.faces.component is the namespace for components declared with @FacesComponent(createTag = true); the prefix (my here) is your choice.

Project layout

A multi-module Maven project that packages an EAR usually has one module per archive type. The descriptors and where they go:

  • application.xml: deployment descriptor of the EAR. Optional since Java EE 5; without it the server finds modules by convention.
  • web.xml: deployment descriptor of the WAR. Optional since Servlet 3.0, when annotations such as @WebServlet are enough.
  • persistence.xml: defines one or more persistence units. Required to use container-managed persistence.
  • ejb-jar.xml: deployment descriptor of the EJB JAR. Optional since EJB 3.0.
  • beans.xml: marks a bean archive for CDI. Without it, only classes with a bean-defining annotation (such as @ApplicationScoped) are discovered. With bean-discovery-mode="all" every class becomes a bean. Since CDI 4.0 an empty beans.xml means annotated, not all.
|-- ear
| |-- src
| | `-- main
| | `-- application
| | |-- META-INF
| | | `-- application.xml
| | `-- config
| | `-- connections.xml
| `-- pom.xml
|-- web
| |-- src
| | `-- main
| | `-- webapp
| | `-- WEB-INF
| | |-- beans.xml
| | `-- web.xml
| `-- pom.xml
|-- ejb
| |-- src
| | `-- main
| | `-- resources
| | `-- META-INF
| | |-- persistence.xml
| | |-- beans.xml
| | `-- ejb-jar.xml
| `-- pom.xml
`-- pom.xml

References

Related notes

13 min read

Jakarta Faces (JSF)

Jakarta Faces (JSF) recipes: WebSocket push, validators with injection, resource handling, component binding, java.time and scopes.

  • Java & Jakarta EE
  • Web & Frontend
3 min read

JasperReports

JasperReports tips: localise reports with resource bundles, print page X of Y, control band splitting and page breaks, and float elements.

  • Java & Jakarta EE
5 min read

JDBC

JDBC driver, DataSource and XADataSource class names per database, with GlassFish and Payara connection pool examples.

  • Java & Jakarta EE
  • Databases

Type to search the whole site.