Skip to main content
Jakarta
June 26, 2022

References

Namespaces

URNs instead of URLs.

  • J2EE 1.4 / JSF 1.0-1.1: javax.faces.* and http://java.sun.com/jsf/*
  • Java EE 5 / JSF 1.2: javax.faces.* and http://java.sun.com/jsf/*
  • Java EE 6 / JSF 2.0-2.1: javax.faces.* and http://java.sun.com/jsf/*
  • Java EE 7 / JSF 2.2: javax.faces.* and http://xmlns.jcp.org/jsf/*
  • Java EE 8 / JSF 2.3: javax.faces.* and http://xmlns.jcp.org/jsf/*
  • Jakarta EE 8 / JSF 2.3: javax.faces.* and http://xmlns.jcp.org/jsf/*
  • Jakarta EE 9 / JSF 3.0: jakarta.faces.* and http://xmlns.jcp.org/jsf/*
  • Jakarta EE 10 / Faces 4.0: jakarta.faces.* and jakarta.faces.*
  • Jakarta EE 11 / Faces 4.1: jakarta.faces.* and jakarta.faces.*
  • http://xmlns.jcp.org/jsf to jakarta.faces
  • http://xmlns.jcp.org/jsf/facelets to jakarta.faces.facelets
  • http://xmlns.jcp.org/jsf/core to jakarta.faces.core
  • http://xmlns.jcp.org/jsf/html to jakarta.faces.html
  • http://xmlns.jcp.org/jsf/passthrough to jakarta.faces.passthrough
  • http://xmlns.jcp.org/jsf/composite to jakarta.faces.composite
  • http://xmlns.jcp.org/jsf/component to jakarta.faces.component
  • http://xmlns.jcp.org/jsp/jstl/core to jakarta.tags.core
  • http://xmlns.jcp.org/jsp/jstl/fmt to jakarta.tags.fmt
  • http://xmlns.jcp.org/jsp/jstl/functions to jakarta.tags.functions
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
<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>

Settings

Jakarta EE1011
Java11/1717/21
Faces4.04.1
EL5.06.0
Servlet6.06.1
CDI4.04.1
WS2.12.2
JPA3.13.2
Facelet4.04.1
GlassFish7.x8.x.

Jakarta EE 11

Faces: faces-config.xml

1
2
3
4
5
<?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

1
2
3
4
5
<?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

1
2
3
4
5
6
<?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">

JPA: persistence.xml

1
2
3
4
5
<?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">

Facelet: taglib.xml

1
2
3
4
5
<?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

1
2
3
4
5
<?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

JSF/Faces: faces-config.xml

1
2
3
4
5
<?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

1
2
3
4
5
<?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

1
2
3
4
5
6
<?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"
       bean-discovery-mode="all" 
       version="4.0">

JPA: persistence.xml

1
2
3
4
5
<?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_1.xsd"
             version="3.1">

Facelet: taglib.xml

1
2
3
4
5
<?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

1
2
3
4
5
<?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.0">

Structure

  • application.xml: mandatory deployment descriptor for the EAR application.
  • web.xml: mandatory deployment descriptor for the WAR application.
  • persistence.xml: mandatory configuration file for the persistence layer. It defines one or more persistence units.
  • ejb-jar.xml: mandatory deployment descriptor for the EJB JAR application.
  • beans.xml: mandatory bean archive descriptor for the CDI applications. It is needed to enable some CDI services.
`--e`w`e`pa-e-j-or-b-b-m.s`ps`ps`pxr-or-or-omc-mc-mc-ml...m`xm`xm`xa-ma-ma-mi-li-li-lnnna`wrp-eep-bslaoiM`c`pW|uMcE-o-pE``rE```aT-n-B--cT---tAf---eA---i-aicIs-oIpgoNbwIpbenNpnFeeNeejFlnabFrabien.sn-ccsxisjat.ms.atixltxriomem.onlnlxnscm..elxx.mmxllml