2

I'm tried to develop jsf composite component but netbeans ide complaints the no library found for this namespace.

xmlns:cform="http://java.sun.com/jsf/composite/cform"

What is the error about ? Where should i put the composite component (which folder) ?

Please help.

Thanks.

nicholas
  • 2,581
  • 14
  • 66
  • 104

1 Answers1

0

The XML namespace url is incorrect. Declaring a namespace like so:

xmlns:composite="http://java.sun.com/jsf/composite"

Will result in composite component namespace like <composite:interface> for example.

Composite components should be in the WEB-INF/resources/[foldername] folder where [foldername] is the name of the folder you wish to keep composite components.

You can then reference your composite components in that folder with the following url and providing a given namespace of your choice. For this example lets say I have a composite component called avatarGenerator.xhtml inside of the following folder, WEB-INF\resources\ptc.

The XML Namespace declaration

xmlns:ptc="http://java.sun.com/jsf/composite/ptc"

The use of avatarGenerator

<ptc:avatarGenerator attributeone="" attributetwo="">
maple_shaft
  • 10,435
  • 6
  • 46
  • 74