New Netbeans installation throws this error:
/index.xhtml @10,20 <ui:remove> Tag Library supports namespace: http://xmlns.jcp.org/jsf/facelets, but no tag was defined for name: remove
Environment:
JSF page:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
<ui:remove>throws an error</ui:remove>
Hello from Facelets
</h:body>
Other ui tags do work.
To reproduce the error just run the new project Web Application wizard and insert an ui:remove tag. Can anyone reproduce this error?
Additional Information:
I updated Netbeans to "Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 2". Still the same exception.
The ui:remove do not throw an exception on a similar machine with an older OSX (10.8.5) and an older JDK (1.7.0_40). Rest same system.
If someone encounters this or similar strange problems with facelets like
One or more resources have the target of "head", but no "head" component has been defined within the view.
just change the javax.faces.jar to a current version. To do this:
First: find the "modules" folder from the glassfish installation. On my Mac it's
/Applications/NetBeans/glassfish-4.0/glassfish/modules/
Second: find the javax.faces.jar and replace it with a current version (just search the net and download). In my case it is javax.faces-2-2-5.jar found at https://maven.java.net/content/repositories/releases/org/glassfish/javax.faces/2.2.5/
Third: don't forget to restart NetBeans
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.