JBoss 7.1 Weld finds Managed Bean in a jar in the ear, but the war does not

前端 未结 1 458
深忆病人
深忆病人 2021-01-24 12:40

jboss-as-7.1.1, dynamic web module 3.0, JSF 2.0 (Mojarra), Eclipse Indigo sr2

I have an EAR, Ynale.ear, which contains a YnaleImpl.jar and a Ynale.war:

Y         


        
相关标签:
1条回答
  • 2021-01-24 13:26

    Weld, which is a CDI implementation, doesn't scan for JSF 2 specific annotations, it only scans for CDI specific annotations like @Named. You have there a JSF 2 specific @ManagedBean annotation instead. For that you need to have a JSF 2 compatible /META-INF/faces-config.xml in the JAR in order to get a JSF 2 web application to scan for classes with JSF 2 specific annotations in the JAR file which is placed in /WEB-INF/lib.

    See also:

    • How to reference JSF managed beans which are provided in a JAR file?
    • Structure for multiple JSF projects with shared code
    0 讨论(0)
提交回复
热议问题