Skip to end of metadata
Go to start of metadata

There are a couple of steps to enabling CDI for JSF2 portlets that use Portlet Bridge.

Artifacts

First is to add the following dependency to your pom.xml to add the portlet integration library for CDI:

CDI Portlet Integration Maven Artifacts for JSF2

Deploying to GateIn

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:

Portlet Filter

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:

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.