1 Reply Latest reply on Dec 27, 2012 10:56 AM by Ken Finnigan

    JSF Based Portlets

    Mylos Kathos Expert

      Hi all !

      I'm trying to develop some JSF 2 based Portlets and I found some examples on GitHub at https://github.com/theute/GateIn-Portal-Extension-Maven-Archetype

      However once I deploy the basic JSF 2 demo the console produces the following error:

       

      Caused by: javax.portlet.PortletException: Can't detect bridge implementation class name

              at javax.portlet.faces.GenericFacesPortlet.calculateBridgeClassName(GenericFacesPortlet.java:623)

              at javax.portlet.faces.GenericFacesPortlet.getBridgeClassName(GenericFacesPortlet.java:316)

              at javax.portlet.faces.GenericFacesPortlet.init(GenericFacesPortlet.java

      :161)

              at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.initPortlet(PortletContainerImpl.java:418) [pc-portlet-2.3.1-Beta02.jar:2.3.1-Beta02]

              at org.gatein.pc.portlet.impl.jsr168.PortletContainerImpl.start(PortletContainerImpl.java:257) [pc-portlet-2.3.1-Beta02.jar:2.3.1-Beta02]

              ... 23 more

       

      Do I need to add something into the portlet.xml configuration file ?

       

      Here's the portlet.xml file used:

       

      <portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0"

          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd

         http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">

          <portlet>

              <description>A simple JSF2 portlet.</description>

              <portlet-name>jsf2HelloWorldPortlet</portlet-name>

              <display-name>JSF2 Hello World Portlet</display-name>

              <portlet-class>javax.portlet.faces.GenericFacesPortlet</portlet-class>

              <init-param>

                  <name>javax.portlet.faces.defaultViewId.view</name>

                  <value>/pages/main.xhtml</value>

              </init-param>

              <init-param>

                  <name>javax.portlet.faces.defaultViewId.edit</name>

                  <value>/pages/edit.xhtml</value>

              </init-param>

              <init-param>

                  <name>javax.portlet.faces.defaultViewId.help</name>

                  <value>/pages/help.xhtml</value>

              </init-param>

              <init-param>

                  <name>javax.portlet.faces.preserveActionParams</name>

                  <value>true</value>

              </init-param>

              <expiration-cache>0</expiration-cache>

              <supports>

                  <mime-type>text/html</mime-type>

                  <portlet-mode>VIEW</portlet-mode>

                  <portlet-mode>EDIT</portlet-mode>

                  <portlet-mode>HELP</portlet-mode>

              </supports>

              <portlet-info>

                  <title>JSF2 Hello World Portlet</title>

              </portlet-info>

              <container-runtime-option>

                  <name>org.gatein.pc.remotable</name>

                  <value>true</value>

              </container-runtime-option>

          </portlet>

      </portlet-app>

       

      Any help ?

      Thanks

      Mylos