Hi; Current JSF detection may not be correct as I commented on the related code. Even in JSF 2.0, AFAIK, it is not necessary to add faces-config.xml file. Then my question is , how could we detect that application is a JSF application?
For registering EL resolver, I thought that if an application is a pure JSP then EL_Resolver defining in the META-INF/faces-config.xml is not registered. If some parts of the application are JSF then it is detected as JSF :) Do you think that we can remove JSF detection and always register resolver with JSPApplicationContext? If there is no side effect of this, we can perfectly remove such check from code. Thanks; --Gurkan ________________________________ From: Joseph Bergmark <[email protected]> To: [email protected] Sent: Fri, November 13, 2009 6:33:04 PM Subject: EL resolver and JSP/JSF Looking over the EnterpriseLifeCycle class, I noticed that the el resolver is only added to the JSP ApplicationContext if a faces-config.xml is not found. I know that the webbeans-impl jar has an entry in the faces-config.xml that adds the el-resolver for JSF, but its seems like that shouldn't prevent JSPs in an application that uses some JSF pages from being able to reference a jcdi bean annotated with @Named. Is this a question of performance? Does having the el-resolver registered with both JSF and JSP mean that we could end up executing the resolver twice if the bean isn't found? Somewhat related, I'm not sure looking for a faces-config.xml is the best way of checking to see if the application is using JSF. The JSF specification describes a web.xml context param (javax.faces.CONFIG_FILES) that can be used to define other configuration files. Sincerely, Joe
