tags:

views:

256

answers:

1

Let's say I've created a simple composite component in one of my JSF 2.0 web applications using Facelets. Now, I want to use that component in another webapp. Rather than copy the .xhtml file from one app to another, I would like to create a library that I can simply include in each of the webapps.

How do I package my composite components to make a library that can be shared across projects?

+2  A: 

After a post to the webtier mailing list I was told that the jar file must have a META-INF/faces-config.xml file that has a root faces-config element with a version of 2.0. After creating that, the webapp was able to reference my custom composite components.

Mailing list thread here

digitaljoel
You got answer of one of the Facelets main developers Jason Lee, so I would really consider it as valid :) It's nice that you posted it here as well.
BalusC
Thanks BalusC. I spent plenty of time on your blog when I was learning jsf 1.1 and 1.2. As for posting here, I figure if it took me all morning to find the answer, hopefully I can keep someone else from that fate.
digitaljoel