Why doesn't JSF 2.0 RI (Mojarra) scan my class' annotations?

前端 未结 2 1527
南笙
南笙 2020-12-01 08:32

I have a War and Jar project in my Eclipse-based JSF project. I have decided to use annotations to declare my FacesConverter, (among a myriad other things), rather than dec

2条回答
  •  自闭症患者
    2020-12-01 09:21

    A JAR contains both EJB & FacesBeans:

    In the case that the JAR that contains Faces Beans is already bundled in an ear (because it contains EJBs), then you also have to put the same JAR in the WEB-INF/lib of the war (on top of adding the faces-config.xml in the META-INF directory), so that the container recognizes the JSF 2.0 Annotations.

    In this case, it is probably better to create two JARS, one for the EJBs and one for the FacesBeans.

提交回复
热议问题