portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r574895 - /portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
Date Wed, 12 Sep 2007 11:51:06 GMT
Author: ate
Date: Wed Sep 12 04:51:05 2007
New Revision: 574895

URL: http://svn.apache.org/viewvc?rev=574895&view=rev
Log:
JS2-729: Preliminary Portlet API 2.0 ResourceURL support allowing full response control like
for cookies and compressed output streams
Also allow access to POSTed parameters when serving a ResourceURL
See: https://issues.apache.org/jira/browse/JS2-729#action_12526751

Modified:
    portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java

Modified: portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java?rev=574895&r1=574894&r2=574895&view=diff
==============================================================================
--- portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
(original)
+++ portals/jetspeed-2/branches/JETSPEED-2.1.3/components/portal/src/java/org/apache/jetspeed/engine/servlet/ServletRequestImpl.java
Wed Sep 12 04:51:05 2007
@@ -44,6 +44,7 @@
 import org.apache.jetspeed.container.PortletDispatcherIncludeAware;
 import org.apache.jetspeed.container.namespace.JetspeedNamespaceMapper;
 import org.apache.jetspeed.container.namespace.JetspeedNamespaceMapperFactory;
+import org.apache.jetspeed.container.state.NavigationalState;
 import org.apache.jetspeed.container.url.PortalURL;
 import org.apache.jetspeed.om.common.GenericMetadata;
 import org.apache.jetspeed.om.common.LocalizedField;
@@ -260,7 +261,7 @@
             // been accessed, flush the cache and rebuild the map.
             currentRequest = getRequest();
 
-            boolean actionRequest = false;
+            boolean postAllowed = false;
             
             // determine the possible additional query string parameters provided on the
RequestDispatcher include path
             // per the specs, these are prepended to existing parameters or altogether new
parameters
@@ -295,13 +296,13 @@
             JetspeedRequestContext context = (JetspeedRequestContext) getAttribute("org.apache.jetspeed.request.RequestContext");
             if (context != null)
             {
-                PortalURL url = context.getPortalURL();
-                actionRequest = context.getActionWindow() != null;
-                Iterator iter = url.getNavigationalState().getParameterNames(portletWindow);
+                NavigationalState ns = context.getPortalURL().getNavigationalState();
+                postAllowed = ns.getPortletWindowOfAction() != null || ns.getPortletWindowOfResource()
!= null;
+                Iterator iter = ns.getParameterNames(portletWindow);
                 while (iter.hasNext())
                 {
                     String name = (String) iter.next();
-                    String[] values = url.getNavigationalState().getParameterValues(portletWindow,
name);
+                    String[] values = ns.getParameterValues(portletWindow, name);
                     navParameters.put(name, values);
                 }
             }
@@ -329,7 +330,7 @@
                 String[] first = (String[])queryParameters.get(key);
                 String[] next = null, last = null, result = null;
                 
-                if ( portletMergePortalParametersWithPortletParameters == false &&
!actionRequest )
+                if ( portletMergePortalParametersWithPortletParameters == false &&
!postAllowed )
                 {
                     next = (String[])navParameters.get(key);
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message