JBoss.orgCommunity Documentation

Chapter 4. Upgrading JBoss Portal 2.6 to 2.7

4.1. Usage of JBossActionRequest

Warning

Before performing any instructions or operations in this chapter, back up your database and the entire JBoss EAP or JBoss AS directory!

JBoss Portal 2.7 compatibility with JBoss Portal 2.6 is very high. The main differences are the use of JSR-286 features to replace JBoss Portal specific features. The database schema hasn't changed.

Usage of JBossActionRequest is not available directly anymore. From now on it is only accessible if the org.jboss.portlet.filter.JBossPortletFilter is applied on the portlet. To do so, first you will need to change the portlet.xml descriptor in order to declare the new portlet as a JSR-286 portlet so that the filter can be applied. For a portlet named MyFooPortlet it would now look like this:



<portlet-app
   xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
   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"
   version="2.0">
   
   <filter>
         <filter-name>JBoss Portlet Filter</filter-name>
         <filter-class>org.jboss.portlet.filter.JBossPortletFilter</filter-class>
         <lifecycle>ACTION_PHASE</lifecycle>
         <lifecycle>RENDER_PHASE</lifecycle>
   </filter>
   
   <filter-mapping>
         <filter-name>JBoss Portlet Filter</filter-name>
         <portlet-name>MyFooPortlet</portlet-name>
   </filter-mapping>
   
   
   <portlet>
      <description>My foo portlet</description>
      <portlet-name>MyFooPortlet</portlet-name>
      ...
   </portlet>
</portlet-app>
       

By not adding this filter on a portlet using JBossActionRequest/JBossActionResponse, an error message such as: The request isn't a JBossRenderRequest, you probably need to activate the JBoss Portlet Filter: org.jboss.portlet.filter.JBossPortletFilter on MyFooPortlet