portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r924601 - /portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/AbstractPageValveImpl.java
Date Thu, 18 Mar 2010 02:15:17 GMT
Author: ate
Date: Thu Mar 18 02:15:17 2010
New Revision: 924601

URL: http://svn.apache.org/viewvc?rev=924601&view=rev
Log:
Support "overriding" or custom "mapping" of requestPath to match through PortalReservedParameters.PATH_ATTRIBUTE
request attribute (which will be set after this pipeline anyway)

Modified:
    portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/AbstractPageValveImpl.java

Modified: portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/AbstractPageValveImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/AbstractPageValveImpl.java?rev=924601&r1=924600&r2=924601&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/AbstractPageValveImpl.java
(original)
+++ portals/jetspeed-2/portal/trunk/components/jetspeed-portal/src/main/java/org/apache/jetspeed/pipeline/valve/impl/AbstractPageValveImpl.java
Thu Mar 18 02:15:17 2010
@@ -106,8 +106,12 @@ public abstract class AbstractPageValveI
     {
         try
         {
-            // get request path
-            String requestPath = request.getPath();
+            // get request path: first check "override" or custom "mapped" path through PATH_ATTRIBUTE
request attribute
+            String requestPath = (String)request.getAttribute(PortalReservedParameters.PATH_ATTRIBUTE);
+            if (requestPath == null)
+            {
+                requestPath = request.getPath();
+            }
             if ((requestPath != null) && (requestPath.length() > 0))
             {
                 if (!requestPath.startsWith(Folder.PATH_SEPARATOR))



---------------------------------------------------------------------
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