• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

jsf composite component in dependency

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In a java application project called mycomposites, i created xhtml with a composite component interface and implementation in
mycomposites/src/main/resources/testcomponents/myComponent.xhtml

Then I created a new project testmycomposites added mycomposites as dependency. Here is the source of an xhtml that should use myComponent:




However running project, I get error:
<tp:myComponent> Tag Library supports namespace: http://java.sun.com/jsf/composite/testcomponents, but no tag was defined for name: myComponent

If i put the same custom component in resources/testcomponents folder of the same project everything works fine.

I can't find any example in wich custom composite components are located in a dependency.

Is it wrong xml namespace or what?

Thanks in advance for reply.
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This might help:

http://www.mkyong.com/jsf2/composite-components-in-jsf-2-0/
 
serafino lillo
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I started from there, but in that example the composite component is not added as a dependency, but it is put in the same project.
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you are saying that you are bundling this component in a separate jar to be included in other projects, then you will have to include a meta-inf file in the component's jar to help JSF properly register it.

I'm not free to locate the details on that right now, but you might have luck with a web search.
 
serafino lillo
Greenhorn
Posts: 13
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Solved moving myComponent.xhtml

from

mycomposites/src/main/resources/testcomponents/myComponent.xhtml

to

mycomposites/src/main/resources/META-INF/resources/testcomponents/myComponent.xhtml

Thanks!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic