[ https://issues.apache.org/jira/browse/MYFACES-3786?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13788058#comment-13788058 ]
Dora Rajappan commented on MYFACES-3786: ---------------------------------------- Additional steps to configure cdi in Tomcat 7 Tomcat has a read-only JNDI, so Weld can't automatically bind the BeanManager extension SPI. To bind the BeanManager into JNDI, you should populate META-INF/context.xml in the web root with the following contents: <Context> <Resource name="BeanManager" auth="Container" type="javax.enterprise.inject.spi.BeanManager" factory="org.jboss.weld.resources.ManagerObjectFactory"/> </Context> and make it available to your deployment by adding this to the bottom ofweb.xml: <resource-env-ref> <resource-env-ref-name>BeanManager</resource-env-ref-name> <resource-env-ref-type> javax.enterprise.inject.spi.BeanManager </resource-env-ref-type> </resource-env-ref> Tomcat only allows you to bind entries to java:comp/env, so the BeanManager will be available at java:comp/env/BeanManager Weld also supports Servlet injection in Tomcat containers. > Web Container injection support should be provided for additional lifecycle > artifacts (not just managed beans) > -------------------------------------------------------------------------------------------------------------- > > Key: MYFACES-3786 > URL: https://issues.apache.org/jira/browse/MYFACES-3786 > Project: MyFaces Core > Issue Type: Task > Components: JSR-344 > Reporter: Leonardo Uribe > Assignee: Leonardo Uribe > Attachments: cdiELresolverWeb.zip, cdiELResolver.zip, > cdiPartialViewContext.war, cdiPartialViewContext.zip, cdiValidatorSource.zip, > cdiValidator.war > > > This issue is all about how to inject beans into jsf artifacts. > See JSF 2.2 section 5.4.1 > The problem here is in some point we need to give the control to the > underlying environment to inject beans into the artifacts, but we don't know > much about how to properly do it, so we need to try with examples. -- This message was sent by Atlassian JIRA (v6.1#6144)