The faces-config.xml in the META-INF directory is necessary to have
JSF automagically include your component in its runtime configuration.
The JSF-spec say, that every jar-file in the WEB-INF/lib directory of
a webapp is to be searched for a META-INF/faces-config.xml and if found 
the faces-config.xml is to be merged into the runtime config.

hth
Alexander

-----Original Message-----
From: Hendrik Neumann [mailto:[EMAIL PROTECTED] 
Sent: Saturday, January 21, 2006 8:56 AM
To: MyFaces Discussion
Subject: Howto add faces-config.xml file to /META-INF in a jar to create a 
deployable jsf component?

Hi List,

I have some problems to create a jar file which contains an
"out-of-the-box" usable JSF-Component.

I analyzed the jar-file from myfaces-all.jar and I noticed that you
put the tld and the faces-config.xml into the /META-INF directory of
the jar file. Is this step needed to let a servlet-container use the
component out of the box? So that you don't need to add the tld and
the faces-config of myfaces in the web.xml of your current project?
And how did you do this? I tried it the ugly way by creating a jar
file with Apache Maven and then using commands like "jar uf
mycomponents.jar META-INF/faces-config.xml" but this it not working
(Tomcat gives me a java.io.FileNotFoundException when it tries to
unpack the faces-config.xml and the webapplication is totally
unusable).

How can I create an out of the box usable jsf-jar-file with Maven?
What am I doing wrong?

--
Mit freundlichen Grüßen / Greetings,
Hendrik Neumann; Ruhr-University of Bochum

Reply via email to