2 Replies Latest reply on Aug 22, 2012 2:55 AM by Igor B

    Content assist in xhtml files not work for two faces-config.xml

    Igor B Newbie

      I use two faces-config.xml files in my maven project in Eclipse. The name of the first is faces-config.xml and the second is second-faces-config.xml - both are in web-inf folder

      The thing is that the first one got "registered" by JBoss tools normaly and I can profit from content assist in my .xhtml files.

       

      But the second one didn't registered and I have no content assist for the managed beans placed in that file.

       

      However, I made it work when I have created second-faces-config.xml by JBoss Tools faces config wizard - than the content assist works - BUT - only for a while. When I restard Eclipse the content assist capabilities for the second-faces-config.xml file dissapear.

       

      Is there any possibility to manualy add second-faces-config.xml to JBoss Tool - so I can profit from content assist all the time?

        • 1. Re: Content assist in xhtml files not work for two faces-config.xml
          Viacheslav Kabanovich Newbie

          Does your project include /WEB-INF/web.xml file with context parameter?

           

          <context-param>

            <param-name>javax.faces.CONFIG_FILES</param-name>

            <param-value>/WEB-INF/second-faces-config.xml</param-value>

          </context-param>

           

          File named faces-config.xml is not required to be registered in web.xml, but other named files should be. When you created second-faces-config.xml file by JBoss Tools faces config wizard, it must have added this context parameter so that it was used by content assist. Could it be that later it was removed from web.xml?

          1 of 1 people found this helpful
          • 2. Re: Content assist in xhtml files not work for two faces-config.xml
            Igor B Newbie

            Yes I do have it (both files are included in web.xml)

             

            Meanwhilie I found out that I have been usinng two web.xml in one project and probably the problem was in maven configuration. Maven configuration pointed to web.xml which doesn't include second-faces-config.xml.

            I did small tidy up in maven configuration and now it seems it works perfect, even after restarting Eclipse.

             

            Thanks.