taylor 2004/04/02 11:38:01
Modified: portal/src/java/org/apache/jetspeed/pipeline/valve/impl
ActionValveImpl.java
Log:
Applied patch from Ate Douma
The render method only logs once (PreferencePortlet).
Im going to leave the issue open until we resolve all issues with Pluto.
PR:
CVS: ----------------------------------------------------------------------
CVS: PR:
CVS: If this change addresses a PR in the problem report tracking
CVS: database, then enter the PR number(s) here.
CVS: Obtained from:
CVS: If this change has been taken from another system, such as NCSA,
CVS: then name the system in this line, otherwise delete it.
CVS: Submitted by:
CVS: If this code has been contributed to Apache by someone else; i.e.,
CVS: they sent us a patch or a new module, then include their name/email
CVS: address here. If this is your work then delete this line.
CVS: Reviewed by:
CVS: If we are doing pre-commit code reviews and someone else has
CVS: reviewed your changes, include their name(s) here.
CVS: If you have not had it reviewed then delete this line.
Revision Changes Path
1.6 +19 -4
jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java
Index: ActionValveImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/pipeline/valve/impl/ActionValveImpl.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ActionValveImpl.java 17 Mar 2004 01:50:13 -0000 1.5
+++ ActionValveImpl.java 2 Apr 2004 19:38:00 -0000 1.6
@@ -18,6 +18,7 @@
import java.io.IOException;
import javax.portlet.PortletException;
+import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -56,6 +57,7 @@
public void invoke(RequestContext request, ValveContext context) throws
PipelineException
{
PortletContainer container;
+ boolean responseCommitted = false;
try
{
// TODO: deprecate this when valves are components
@@ -63,10 +65,14 @@
PortletWindow actionWindow = request.getActionWindow();
if (actionWindow != null)
{
+ HttpServletResponse response =
request.getResponseForWindow(actionWindow);
container.processPortletAction(
actionWindow,
request.getRequestForWindow(actionWindow),
- request.getResponseForWindow(actionWindow));
+ response);
+ // The container redirects the client after PortletAction processing
+ // so there is no need to continue the pipeline
+ responseCommitted = response.isCommitted();
}
else
{
@@ -91,8 +97,17 @@
}
finally
{
- // Pass control to the next Valve in the Pipeline
- context.invokeNext(request);
+ // Check if an action was processed and if its response has been
committed
+ // (Pluto will redirect the client after PorletAction processing)
+ if ( responseCommitted )
+ {
+ log.info("Action processed and response committed (pipeline
processing stopped)");
+ }
+ else
+ {
+ // Pass control to the next Valve in the Pipeline
+ context.invokeNext(request);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]