Details

      Description

      The Portlet 3.0 Javadoc for MimeResponse.createActionURL() states a new requirement for portlets that opt-in to Portlet 3.0:

      The effect of this method is the same as calling createRenderURL(Copy) with the parameter set to PUBLIC.

      Note that this has implications for the <portlet:actionURL /> JSP tag which must include public and private render parameters if copyCurrentRenderParameters="true".

      Similarly, the Portlet 3.0 Javadoc for MimeResponse.createRenderURL() states a similar requirement:

      The effect of this method is the same as calling createRenderURL(Copy) with the parameter set to PUBLIC.

      Since these requirements are not present in the Portlet 2.0 Javadoc, it is necessary for a portlet to opt-in to this Portlet 3.0 runtime behavior.

      Finally, the Portlet 3.0 Javadoc for MimeResponse.createResourceURL() states:

      If cacheability is set to PORTLET or PAGE, the values of the render parameters, portlet mode, and window state are preserved. Otherwise, they will not be preserved.

      This is a clarification of the Portlet 2.0 Javadoc for MimeResponse.createResourceURL() which stated:

      The current render parameters, portlet mode and window state are preserved.

      Regardless, the implication is that MimeResponse.createResourceURL() must return a URL that contains both public and private render parameters under certain conditions. This also has implications for the <portlet:resourceURL /> JSP tag which needs to generate a URL with both public and private render parameters.

      The following three examples show how to opt-in for Portlet 3.0 runtime behavior:

      portlet.xml
      <portlet-app xmlns="http://xmlns.jcp.org/xml/ns/portlet"
      			 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      			 xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/portlet http://xmlns.jcp.org/xml/ns/portlet/portlet-app_3_0.xsd"
      			 version="3.0">
          ...
      </portlet-app>
      
      MyBeanPortlet.java
      @PortletConfiguration(portletName="MyBeanPortlet", version="3.0")
      public class MyBeanPortlet {
          ...
      }
      
      MyDeclarativeServicesPortlet.java
      @Component(
      	immediate = true,
      	property = {
      		"javax.portlet.name=MyDeclarativeServicesPortlet",
      		"javax.portlet.version=3.0"
      	},
      	service = Portlet.class
      )
      public class MyDeclarativeServicesPortlet {
          ...
      }
      

        Attachments

          Activity

            People

            Assignee:
            brian.chan Brian Chan
            Reporter:
            neil.griffin Neil Griffin
            Recent user:
            Csaba Turcsan
            Participants of an Issue:
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 9 weeks, 1 day ago

                Packages

                Version Package
                7.1.10 DXP FP1
                7.1.1 CE GA2
                7.1.10.1 SP1
                7.1.X
                Master