There are a couple of steps to enabling CDI for JSF2 portlets that use Portlet Bridge.
First is to add the following dependency to your pom.xml to add the portlet integration library for CDI:
When deploying to GateIn, the portlet integration library for CDI is automatically included for JSF2 portlets that use CDI.
So we need to ensure the dependency is marked as provided in our pom.xml:
Add the following portlet filter definition into your portlet.xml:
Then add to portlet.xml the activation of the above filter for each portlet that requires CDI: