I tried xmlns:h="jakarta.faces.html"
, xmlns:h="http://jakarta.faces.html"
, xmlns:h="https://jakarta.faces.html"
and other similar strings, but nothing seems to work.
The xmlns:h="jakarta.faces.html"
is introduced in Faces 4.0, part of Jakarta EE 10.
In JSF 3.0, part of Jakarta EE 9, it is still xmlns:h="http://xmlns.jcp.org/jsf/html"
.
Summary of API packages and XML namespace URIs to use:
- J2EE 1.4 / JSF 1.0-1.1:
javax.faces.*
andhttp://java.sun.com/jsf/*
- Java EE 5 / JSF 1.2:
javax.faces.*
andhttp://java.sun.com/jsf/*
- Java EE 6 / JSF 2.0-2.1:
javax.faces.*
andhttp://java.sun.com/jsf/*
- Java EE 7 / JSF 2.2:
javax.faces.*
andhttp://xmlns.jcp.org/jsf/*
- Java EE 8 / JSF 2.3:
javax.faces.*
andhttp://xmlns.jcp.org/jsf/*
- Jakarta EE 8 / JSF 2.3:
javax.faces.*
andhttp://xmlns.jcp.org/jsf/*
- Jakarta EE 9 / JSF 3.0:
jakarta.faces.*
andhttp://xmlns.jcp.org/jsf/*
- Jakarta EE 10 / Faces 4.0:
jakarta.faces.*
andjakarta.faces.*
Noted should be that the XML namespace URIs are backwards compatible in each newer version. So in e.g. Faces 4.0 you can still use the http://java.sun.com/jsf/*
and http://xmlns.jcp.org/jsf/*
URIs next to jakarta.faces.*
. But this is clearly not recommended as support for old URIs are still prone to be removed sometime in the future and any new components/tags introduced for the first time in a newer URI are not necessarily available via older URIs.
Faces 4.0 is the first version to use a URN instead of URL as XML namespace URI. So the URL-form with http(s)://
prefix is invalid. The reason for using a URN instead of URL is because those taglib URIs are in first place not available as physical web resources returning some sort of XSD file and therefore caused confusion among starters. Moreover, URNs are more future-proof as you don't necessarily need to include a hostname such as java.sun.com
or xmlns.jcp.org
which are more sensitive to change of name/owner than an API name.
See also:
© 2022 - 2024 — McMap. All rights reserved.