4 Replies Latest reply on Sep 4, 2008 2:25 AM by Michael Bien

    JBoss Portal Portlet 2.0 compatiblility

    Michael Bien Newbie

      Hello everyone,

      is the JBoss Portal 2.7.0b implementation of the Portlet 2.0 spec already feature complete?

      I got a ClassCastException in my prototype while evaluating the Portal event wirering.

      @Override
      public void processEvent(EventRequest request, EventResponse response) throws PortletException, IOException {
       System.out.println("portlet 2.0 events rock!")
       //...
       //...
       PortletRequestDispatcher prd = getPortletContext().getRequestDispatcher("/WEB-INF/iframe/iframe.jsp");
       prd.include(request, response);
      }
      




      portlet 2.0 events rock!
      java.lang.ClassCastException: org.jboss.portal.portlet.impl.jsr168.api.EventRequestImpl cannot be cast to javax.portlet.RenderRequest
      at org.jboss.portal.portlet.impl.jsr168.taglib.DefineObjectsTag.doEndTag(DefineObjectsTag.java:63)
      at org.apache.jsp.WEB_002dINF.iframe.iframe_jsp._jspService(iframe_jsp.java:67)
      at org.jboss.portal.core.servlet.jsp.PortalJsp.service(PortalJsp.java:143)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      ...

      (afaik JBP should expect a PortletRequest instead of a RenderRequest if it implements the Portlet 2.0 spec at this point)

      I also noticed some differences comparing the jboss doc with the apache pluto portlet 2.0 reference impl (e.g PortletRequestDispatcher):
      http://portals.apache.org/pluto/portlet-api/apidocs/javax/portlet/PortletRequestDispatcher.html
      http://docs.jboss.com/jbportal/v2.7.0.B1/javadoc/portlet/javax/portlet/PortletRequestDispatcher.html

      thank you in advance,

      mbien