EL resolver in faces-config.xml

前端 未结 1 1522
暖寄归人
暖寄归人 2020-12-16 21:01

While working on a Spring-JSF integration, I\'m seeing this entry in faces-config.xml.


    
        org.s         


        
相关标签:
1条回答
  • 2020-12-16 21:39

    <application> represents the JSF application. Exactly the one as you can obtain as

    Application application = FacesContext.getCurrentInstance().getApplication();
    

    <el-resolver> represents the EL resolver as used by JSF application. Exactly the one as you can obtain as

    ELResolver elResolver = application.getELResolver();
    

    What exactly they in turn do can just be read in their javadocs which I've linked above. In a nutshell, the Application basically represents the application-wide JSF configuration and the ELResolver is responsible for evaluating EL expressions in form of #{...}.

    In case of SpringBeanFacesELResolver, it decorates the underlying EL resolver to recognize Spring managed beans as well based on Spring's own application context and configuration files. In other words, you'll this way be able to use Spring managed beans in JSF pages via EL.

    See also:

    • Spring JSF integration: how to inject a Spring component/service in JSF managed bean?
    0 讨论(0)
提交回复
热议问题