Reputation: 9
If you start a dynamic web project in Eclipse EE 2024-12 you get the following settings:
.classpath
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.jboss.ide.eclipse.as.core.server.runtime.runtimeTarget/WildFly 27.0 Runtime">
<attributes>
<attribute name="owner.project.facets" value="jst.web;jst.jsf"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="output" path="build/classes"/>
</classpath>
.project:
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>reproduction</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>
the generated example index.xhtml:
<!-- this part is generated by Eclipse, and not JSF 4.0 compilant:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
not the below correct, nor the above incorrect URLs can get Eclipse to find the tag library; it gives the error: "Can't find the facelet tag library." And code completion doesn't work.
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en"
xmlns:h="jakarta.faces.html"
xmlns:f="jakarta.faces.core"
xmlns:ui="jakarta.faces.facelets">
<f:loadBundle basename="resources.application" var="msg"/>
<head>
<title><h:outputText value="#{msg.welcomeTitle}" /></title>
</head>
<body>
<h3><h:outputText value="#{msg.welcomeHeading}" /></h3>
<p><h:outputText value="#{msg.welcomeMessage}" /></p>
</body>
</html>
So the above xhtml can not be validated by Eclipse, which makes sense, since you can not set the project to have JSF above 2.3 (and this is a 4.0+ feature)
JSF project nature only goes up to 2.3
How could I enable JSF 4.0 support?
Upvotes: -3
Views: 44
Reputation: 1109402
Eclipse "Web Tools JSF" plugin is responsible for this job: https://projects.eclipse.org/projects/webtools.jsf
Its latest release was 3.13 on 20 Mar 2019: https://projects.eclipse.org/projects/webtools.jsf/releases/3.13
JSF 3.0 was released Nov 2020, it and any newer version is simply not recognized yet.
You can find here the open source code repository: https://github.com/eclipse-jsf/webtools.jsf
You can find here its issue tracker: https://github.com/eclipse-jsf/webtools.jsf/issues
Someone already opened an issue to implement support for newer JSF versions 3.0/4.0/4.1: https://github.com/eclipse-jsf/webtools.jsf/issues/8
That issue links to a PR opened on 12 Jan 2025: https://github.com/eclipse-jsf/webtools.jsf/pull/11
As you can see, that PR has currently not yet been approved/merged.
Upvotes: 0