jsf 2.2, netbeans, ui:remove - Tag Library supports ... but no tag was defined for name: remove

StackOverflow https://stackoverflow.com/questions/21896917

  •  13-10-2022
  •  | 
  •  

Question

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:

  • Product Version: NetBeans IDE 7.4 (Build 201310111528)
  • Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03 Runtime:
  • Java(TM) SE Runtime Environment 1.7.0_51-b13
  • System: Mac OS X version 10.9.1 running on x86_64; UTF-8; de_DE (nb)

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top