9 Replies Latest reply on Oct 12, 2010 2:04 PM by Jboss fan99

    Weld in JBoss 6 M5 not working in a simple EAR

    Jboss fan99 Newbie


        @Named annotation doesn't work in EAR, but the same code works in WAR file. I'm working on an EAR project and have marked a bean with @Named annotation. But this bean is not called from JSF page - it just blank without any error. My bean is part of the EJB project and JSF in WAR file. If I move the bean to WAR file, same JSF code works. I have beans.xml file in both WAR and META-INF of EJB jar file.

      Please help.



      here's the bean



      public class MyTestBean{


      public String getName() {

      return name;



      public void setName(String name) {

      this.name = name;



      private String name = "Test";




      here's the JSF page


      ui:composition template="mytemplate.xhtml">

      <ui:define name="body">It's a test!

      #{mybean.name}     </ui:define>

      <ui:debug hotkey="q"> </ui:debug>