I think (would need to look it up in the spec, though) that the faces-config.xml is taken automatically...
regards, Martin On 6/15/05, Daniel Zwink <[EMAIL PROTECTED]> wrote: > Hi, > > on 15.06.2005 15:37 Martin Marinschek said the following: > > > this is the code from MyFaces, and it shows that the phase listener > > should only be added once: > > [...] > > Yep. > > > I shortly looked over the rest of the code, don't see any problems there... > > > > Maybe you got two faces-config.xml files in different directories and > > this is why they are called twice? > > After debugging the faces servlet initialisation (which is done through > "org.apache.myfaces.webapp.StartupServletContextListener") I found the > solution: > > During the servlet initialisation the method "configure()" in > "org.apache.myfaces.config.FacesConfigurator" is called. This method > calls a number of other methods to read configuration (files). > Especially the following two methods are important in this case: > > feedContextSpecifiedConfig(); > feedWebAppConfig(); > > Due to the fact that I declared my faces config file in web.xml as a > context-param it was read twice because it is read from web.xml through > "feedContextSpecifiedConfig()" and also hard coded in "feedWebAppConfig()"! > > ----- snip ----- > String systemId = "/WEB-INF/faces-config.xml"; > ----- snap ----- > > > Is this desired behaviour? I thought I have to declare my faces config > file in web.xml and didn't know, that it is hard coded. > > > Greets, Daniel > -- > Orientation in Objects GmbH > Weinheimerstr. 68 > D-68309 Mannheim > http://www.oio.de > Tel +49(0)621-71839-0 > Fax. +49(0)621-71839-50 >

