There are no specific requirements to use Portlet Bridge in a JSF portlet, but it does need to be a JSF2 portlet for this version of the Portlet Bridge to function as expected.
There are now a few different ways to include Portlet Bridge into your application.
The following dependencies are required in your pom.xml for a JSF2 portlet:
If your portlet uses RichFaces 4, then you will also need the following dependency:
Using the new Portlet Bridge depchain poms it's possible to reduce what needs to be added to your pom.xml to a single dependency.
For a JSF2 portlet add:
For a RichFaces 4 portlet add:
When deploying to GateIn, the Portlet Bridge is automatically included for JSF2 portlets.
If you use the Portlet Bridge API in your code you still need to add it to your pom.xml with a provided scope. To do this the following dependency is required in your pom.xml:
If your portlet uses RichFaces 4, then you will need to include the Portlet Bridge RichFaces extension as this is not included with GateIn. It is important that you include the same version of the extension as the one bundled with GateIn.
You can find out what version is included in GateIn by looking in the directory $GATEIN_HOME/modules/org/jboss/portletbridge/api/main.
To do this the following dependency is required in your pom.xml:
If you still want to include the Portlet Bridge in your application you can disable the automatic inclusion of Portlet Bridge. This could, for example, be useful if you need to use a different version of Portlet Bridge.
To do that, just specify the WAR_BUNDLES_PORTLETBRIDGE context param in your web.xml file like this:
The automatic inclusion of Portlet Bridge is also disabled if you are not using the bundled JSF2 implementation (by specifying either WAR_BUNDLES_JSF or JSF_CONFIG_NAME context parameters).