myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan-Kees van Andel" <>
Subject RE: Qeestion about jsf
Date Mon, 04 Jun 2007 17:41:45 GMT
Step 1:

The order in which JAR files in WEB-INF/lib are encountered is unspecified,
even in JSF 1.2.

But at the moment, you can pretty much assume they are loaded in
alphabetical order, both in MyFaces and in Sun RI. I heard that was an
agreement in the expert Group.


Step 2:

When you define files using the context-param: javax.faces.CONFIG_FILES,
they are loaded now.


Step 3:

Load <<<web application>>>/WEB-INF/faces-config.xml.


Important to note is that if there is a conflict (i.e. duplicate component),
the last definition takes precedence, or the definitions are merged (if
that's possible for that specific element)


So, theoretically, it should use j2.MyViewRoot2.


I hope this helps you.




Jan-Kees van Andel





Van: [] 
Verzonden: maandag 4 juni 2007 18:47
Onderwerp: RE: Qeestion about jsf


Hi Bryan, i don't have any error but the question is:


I have two jar in WEB-INF/lib j1.jar and j2.jar. Both have a META-INF
directory with a faces.config.xml. The faces.config.xml of j1.jar contains
the definition:






And j2.jar






So, witch is the javax.faces.ViewRoot component used by JSF?




From: Bryan Basham [] 
Sent: 4 giugno 2007 16.24
To: MyFaces Discussion
Subject: Re: Qeestion about jsf


Hello Mario,

In principle, you are doing the right thing by declaring the
component-class for an existing component type in the faces-config
file.  So, I cannot tell from your message what is going wrong.
Can you send us the error message?

Also, be warned that it is not trivial to use a custom component
for the view root.  I tried this a few weeks ago and failed to get
JSF to recognize my custom view root component *and* to have
it behave like a view root.  I only tried a few hours, but decided it
was not worth my effort.  However, if you are successful, I would
*love* to hear how you did it.

-Bryan wrote: 

Hi, I have a question about the JSF mechanism used to set a component:


If I have to jars both defining:







Witch is the component type used for ViewRoot? May be depends on the
classloader order used to load jars?


Thanks in advance


This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete the
original. Any other use of the email by you is prohibited.


View raw message