Uploaded image for project: 'Portals Bridges (Retired)'
  1. Portals Bridges (Retired)
  2. PB-2

Struts Bridge assumes the portletRequest component is always stored as request attribute when invoked from a Portlet

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.2, 0.3, 1.0
    • 1.0
    • struts
    • None
    • GridSphere 2.0

    Description

      The Struts Bridge can be used from within a web application as well as a portlet application context (even concurrently).

      To determine in what context it is operating, the StrutsServlet provides a static boolean isPortletRequest(ServletRequest) method which
      checks if a "javax.portlet.request" request attribute is set.
      This is based on Portlet API specification PLT.16.3.2. But, that only applies to RenderRequest events as the Portlet API doesn't
      formally support servlet invocation from an ActionRequest as the Struts Bridge does.
      In GridSphere, this resulted in a problem because its JSR-168 container only sets the "javax.portlet.request" attribute (as well as the others)
      during the RenderRequest event.
      Note: the Apache Jetspeed-2 portal does set these attributes also during an ActionRequest event.

      After some discussion on the bridges-dev mailing list with Jason Novotny from GridSphere (who reported this problem)
      and Stefan Hepper which is on the JCP team for the JSR-168, we agreed upon the following solution:

      The StrutsPortlet will set the servlet request attributes as described in PLT.16.3.2 itself if they haven't been set already and (only) when invoked
      from an ActionRequest.
      Struts Portlet Applications can thus rely on these attributes to be set in all situations and there is still no additional requirement for portlet containers
      beyond the JSR-168 specification.

      Attachments

        Activity

          People

            ate Ate Douma
            ate Ate Douma
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: