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. Greets, Jan-Kees van Andel Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Verzonden: maandag 4 juni 2007 18:47 Aan: [email protected] 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: <component> <component-type>javax.faces.ViewRoot</component-type> <component-class>j1.MyViewRoot1</component-class> </component> And j2.jar <component> <component-type>javax.faces.ViewRoot</component-type> <component-class>j2.MyViewRoot2</component-class> </component> So, witch is the javax.faces.ViewRoot component used by JSF? Mario _____ From: Bryan Basham [mailto:[EMAIL PROTECTED] 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 [EMAIL PROTECTED] wrote: Hi, I have a question about the JSF mechanism used to set a component: If I have to jars both defining: <component> <component-type>javax.faces.ViewRoot</component-type> <component-class>xxxxxxx.myClassXXX</component-class> </component> Witch is the component type used for ViewRoot? May be depends on the classloader order used to load jars? Thanks in advance Mario 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.

