Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faces 4.0: rename xmlns.jcp.org taglib URIs #1553

Closed
BalusC opened this issue Jan 31, 2021 · 8 comments
Closed

Faces 4.0: rename xmlns.jcp.org taglib URIs #1553

BalusC opened this issue Jan 31, 2021 · 8 comments
Milestone

Comments

@BalusC
Copy link
Member

BalusC commented Jan 31, 2021

Proposal: use URNs instead of URLs as URLs are more prone to confuse people.

Rename http://xmlns.jcp.org/jsf to jakarta.faces
Rename http://xmlns.jcp.org/jsf/facelets to jakarta.faces.facelets
Rename http://xmlns.jcp.org/jsf/core to jakarta.faces.core
Rename http://xmlns.jcp.org/jsf/html to jakarta.faces.html
Rename http://xmlns.jcp.org/jsf/passthrough to jakarta.faces.passthrough
Rename http://xmlns.jcp.org/jsf/composite to jakarta.faces.composite
Rename http://xmlns.jcp.org/jsf/component to jakarta.faces.component

<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>

Thoughts?

@christophs78
Copy link

Should this values be prefixed with "urn:"? Not totally sure what XML allows.

@tandraschko
Copy link

+1

@edbratt
Copy link

edbratt commented Feb 3, 2021

As an expedient, the relevant xsd documents could be revised and uploaded to jakarta.ee/xml/ns/faces (or something suitable) i.e. check them in here. At least, that would be consistent with other Jakarta EE Specs (JakartaEE, JSONB, JSONP, etc. Some IDEs do validate in real-time from the URL locations (Intellij for example).

@BalusC
Copy link
Member Author

BalusC commented Feb 4, 2021

There are no XSD documents in first place. Hence the proposal to use URN instead of URL.

@arjantijms
Copy link
Contributor

@edbratt Just to emphasise this, for the taglib URIs there are no XSD documents. Because it was the norm to use URLs for them, many people believed there were XSD documents backing them, but this is a totally different concept from say web.xml or faces-config.xml documents.

@BalusC
Copy link
Member Author

BalusC commented Mar 27, 2021

Implemented now.

Jakarta Tags namespaces have also been remapped.

http://xmlns.jcp.org/jsp/jstl/core is now jakarta.tags.core
http://xmlns.jcp.org/jsp/jstl/functions is now jakarta.tags.functions

All old namespaces retain their backwards compatibility.

BalusC added a commit to eclipse-ee4j/mojarra that referenced this issue Mar 27, 2021
BalusC added a commit to eclipse-ee4j/mojarra that referenced this issue Mar 27, 2021
@BalusC BalusC closed this as completed Mar 27, 2021
@tandraschko
Copy link

tandraschko commented Apr 13, 2021

@BalusC @arjantijms
how do we handle JSTL?
I mean, we only use the namespace but its implemented in the JSF actually (at least in MyFaces)
I can only see a class usage of jakarta.servlet.jsp.jstl.sql.Result.

Could we just introduce our own namespace here for the JSTL tags?
maybe something like "jakarta.faces.core.buildtime"?

We could then completely get rid of the jstl and JSP usage. Just a special case for supporting jakarta.servlet.jsp.jstl.sql.Result.

@BalusC
Copy link
Member Author

BalusC commented Apr 14, 2021

Could we just introduce our own namespace here for the JSTL tags?

I've already coined jakarta.tags.core and jakarta.tags.functions: jakartaee/tags#144

Just a special case for supporting jakarta.servlet.jsp.jstl.sql.Result.

@arjantijms already removed it from UIData#getValue() javadoc during eclipse-ee4j/mojarra#4775

BalusC added a commit to eclipse-ee4j/mojarra that referenced this issue Apr 14, 2021
BalusC added a commit to eclipse-ee4j/mojarra that referenced this issue Apr 14, 2021
arjantijms added a commit to eclipse-ee4j/jakartaee-tutorial that referenced this issue Mar 7, 2022
Porting Jakarta EE Tutorial from '9.1' to '10'. Jakarta Faces. Faces 4.0: "Rename xmlns.jcp.org taglib URIs" (jakartaee/faces#1553)
arjantijms added a commit to eclipse-ee4j/jakartaee-tutorial that referenced this issue Mar 8, 2022
Porting Jakarta EE Tutorial from '9.1' to '10'. Jakarta Faces. Faces 4.0: "Rename 'http://xmlns.jcp.org/jsf/*' URL to 'jakarta.faces.*' URN ((jakartaee/faces#1553))
asbachb added a commit to asbachb/netbeans that referenced this issue Jun 18, 2023
Since Jakarte EE Faces 4 the xmls namespaces were changed from `http://xmlns.jcp.org/jsf` to `jakarta.*`.
(see jakartaee/faces#1553)

This change adds new namespace support for:
* Generation of new JSF pages
* Tag suggestion in faces xhtml editor view
* Automatical addition of missing namespace decleration when new taglib is used

Reference: apache#6069
asbachb added a commit to asbachb/netbeans that referenced this issue Jun 19, 2023
Since Jakarte EE Faces 4 the xmls namespaces were changed from `http://xmlns.jcp.org/jsf` to `jakarta.*`.
(see jakartaee/faces#1553)

This change adds new namespace support for:
* Generation of new JSF pages
* Tag suggestion in faces xhtml editor view
* Automatic addition of missing namespace decleration when new taglib is used

In order to support the JSF 4.0 namespaces the `enum` `JsfVersion` in `web.jsfapi` module
was introduced. It's used to map the taglib namespaces based on the projects detected
JSF version.

Note: There's already an enum `JSFVersion` which is not part of the api. Both enums might
be merged in the future.

Reference: apache#6069
asbachb added a commit to asbachb/netbeans that referenced this issue Jun 19, 2023
Since Jakarte EE Faces 4 the xmls namespaces were changed from `http://xmlns.jcp.org/jsf` to `jakarta.*`.
(see jakartaee/faces#1553)

This change adds new namespace support for:
* Generation of new JSF pages
* Tag suggestion in faces xhtml editor view
* Automatic addition of missing namespace decleration when new taglib is used

In order to support the JSF 4.0 namespaces the `enum` `JsfVersion` in `web.jsfapi` module
was introduced. It's used to map the taglib namespaces based on the projects detected
JSF version.

Note: There's already an enum `JSFVersion` which is not part of the api. Both enums might
be merged in the future.

Reference: apache#6069
asbachb added a commit to asbachb/netbeans that referenced this issue Jun 19, 2023
Since Jakarte EE Faces 4 the xmls namespaces were changed from `http://xmlns.jcp.org/jsf` to `jakarta.*`.
(see jakartaee/faces#1553)

This change adds new namespace support for:
* Generation of new JSF pages
* Tag suggestion in faces xhtml editor view
* Automatic addition of missing namespace declaration when new taglib is used

In order to support the JSF 4.0 namespaces the `enum` `JsfVersion` in `web.jsfapi` module
was introduced. It's used to map the taglib namespaces based on the projects detected
JSF version.

Note: There's already an enum `JSFVersion` which is not part of the api. Both enums might
be merged in the future.

Reference: apache#6069
BalusC pushed a commit that referenced this issue Feb 10, 2024
majguo added a commit to azure-javaee/open-liberty-on-aks that referenced this issue Feb 18, 2024
Signed-off-by: Jianguo Ma <jiangma@microsoft.com>
majguo added a commit to azure-javaee/open-liberty-on-aks that referenced this issue Feb 18, 2024
Signed-off-by: Jianguo Ma <jiangma@microsoft.com>
majguo added a commit to azure-javaee/open-liberty-on-aks that referenced this issue Feb 18, 2024
Signed-off-by: Jianguo Ma <jiangma@microsoft.com>
edburns added a commit to Azure-Samples/open-liberty-on-aks that referenced this issue Feb 20, 2024
…ks Bing AI. (#44)

* On branch edburns-msft-ibm-524-update-to-ee-10 Fix indentation.
modified:   java-app/pom.xml
modified:   java-app/src/main/liberty/config/server.xml
modified:   java-app/src/main/resources/META-INF/persistence.xml
modified:   java-app/src/main/webapp/WEB-INF/faces-config.xml
modified:   java-app/src/main/webapp/WEB-INF/web.xml

Signed-off-by: Ed Burns <edburns@microsoft.com>

* fix formatting

* On branch edburns-msft-ibm-524-update-to-ee-10 Upgrade to EE 10, but it does not yet build.
modified:   java-app/pom.xml
modified:   java-app/src/main/java/cafe/model/CafeRepository.java
modified:   java-app/src/main/java/cafe/model/entity/Coffee.java
modified:   java-app/src/main/java/cafe/web/rest/CafeResource.java
modified:   java-app/src/main/java/cafe/web/view/Cafe.java
modified:   java-app/src/main/liberty/config/server.xml
modified:   java-app/src/main/resources/META-INF/persistence.xml
modified:   java-app/src/main/webapp/WEB-INF/faces-config.xml
modified:   java-app/src/main/webapp/WEB-INF/web.xml
modified:   java-app/src/main/webapp/index.xhtml

```bash
[ERROR] Failed to execute goal io.openliberty.tools:liberty-maven-plugin:3.10:install-feature (package-server) on project javaee-cafe: Error installing features for server defaultServer: CWWKF1299E: The following features could not be obtained: jaxb-4.0 restfulws-3.0 enterprisebeanslite-4.0 cdi-4.0 persistence-3.0 faces-4.0 io.openliberty.emptyHandleListContext-1.0 com.ibm.websphere.appserver.ejbliteJNDI-1.0 com.ibm.websphere.appserver.javaeePlatform7.0-jndi1.0 io.openliberty.ejbliteJPA-2.0 io.openliberty.restfulWS3.0-xmlBinding3.0 com.ibm.websphere.appserver.ejbComponentMetadataDecorator-1.0 com.ibm.websphere.appserver.jakarta-transactionContext-1.0 com.ibm.websphere.appserver.classloaderContext-1.0. Ensure that the features are valid for Open Liberty. -> [Help 1]
```

Signed-off-by: Ed Burns <edburns@microsoft.com>

* On branch edburns-msft-ibm-524-update-to-ee-10 With help from @Nathanrauh, got past the problem in #43 (comment)
modified:   java-app/src/main/liberty/config/server.xml

Signed-off-by: Ed Burns <edburns@microsoft.com>

* ignore the local coffee.xml

* add jsonb-3.0 to enable json binding

Signed-off-by: Jianguo Ma <jiangma@microsoft.com>

* Use Faces 4.0 URNs, see jakartaee/faces#1553

Signed-off-by: Jianguo Ma <jiangma@microsoft.com>

---------

Signed-off-by: Ed Burns <edburns@microsoft.com>
Signed-off-by: Jianguo Ma <jiangma@microsoft.com>
Co-authored-by: Jianguo Ma <jiangma@microsoft.com>
majguo added a commit to azure-javaee/open-liberty-on-aro that referenced this issue Sep 14, 2024
Signed-off-by: Jianguo Ma <jiangma@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants