PortalDriverFilter doesn't handle action requests properly, throws 
IllegalStateException
----------------------------------------------------------------------------------------

                 Key: PLUTO-507
                 URL: https://issues.apache.org/jira/browse/PLUTO-507
             Project: Pluto
          Issue Type: Bug
          Components: portal driver
    Affects Versions: 2.0.0, 2.0-refactoring
         Environment: JDK 1.5.0_16, Tomcat 5.5.27
            Reporter: Brian DeHamer
             Fix For: 2.0.0, 2.0-refactoring


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
        
org.apache.pluto.driver.PortalDriverFilter.doFilter(PortalDriverFilter.java:125)

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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to