Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-507

PortalDriverFilter doesn't handle action requests properly, throws IllegalStateException


    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-refactoring, 2.0.0
    • Fix Version/s: 2.0-refactoring, 2.0.0
    • Component/s: portal driver
    • Labels:
    • Environment:
      JDK 1.5.0_16, Tomcat 5.5.27


      Action requests targeted at a portlet which is rendered via the PortalDriverFilter are not handled properly. The PortalDriverFilter should return immediately after handling an incoming action request since the end result of an action request is to issue a redirect to the client's browser. As currently implemented, the PortalDriverFilter does NOT return after an action request resulting in the following exception:

      java.lang.IllegalStateException: Cannot forward after response has been committed

      There is logic in the PortalDriverFilter that attempts to determine if the current request is an action request and will immediately return if an action request is detected; however, the logic that is being used to test for an action request is incorrect.

      The following block of code is used to detect an action request (lines 110-113)

      PortalURL url = ctx.getRequestedPortalURL();
      if (url.getActionWindow() != null)

      { return; }

      Note that the call to getActionWindow() will ALWAYS return null after an action request has been handled (there is logic in the PortletContainerImpl that sets this value to null during the processing of the action request). Since getActionWindow() always returns null, the return statement is never executed. The subsequent invocation of the forward() method on the RequestDispatcher() (line 125) causes the IllegalStateException since a redirect has already been sent to the client.


        1. patch-507.txt
          2 kB
          Brian DeHamer



            • Assignee:
              bdehamer Brian DeHamer
            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created: