cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1426548 - in /cxf/branches/2.6.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
Date Fri, 28 Dec 2012 15:35:02 GMT
Author: sergeyb
Date: Fri Dec 28 15:35:02 2012
New Revision: 1426548

URL: http://svn.apache.org/viewvc?rev=1426548&view=rev
Log:
Merged revisions 1426547 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1426547 | sergeyb | 2012-12-28 15:30:11 +0000 (Fri, 28 Dec 2012) | 1 line
  
  Minor update to ResponseDispatcherProvider to get redirections paths from the output message
........

Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1426547

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java?rev=1426548&r1=1426547&r2=1426548&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
(original)
+++ cxf/branches/2.6.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/RequestDispatcherProvider.java
Fri Dec 28 15:35:02 2012
@@ -68,6 +68,8 @@ public class RequestDispatcherProvider e
     private static final String REQUEST_SCOPE = "request";
     private static final String SESSION_SCOPE = "session";
     
+    private static final String MESSAGE_RESOURCE_PATH_PROPERTY = "redirect.resource.path";
+    
     private static final String DEFAULT_RESOURCE_EXTENSION = ".jsp";
     private static final String DEFAULT_LOCATION_PREFIX = "/WEB-INF/";
     
@@ -136,6 +138,9 @@ public class RequestDispatcherProvider e
                 }
             }
         }
+        if (mc != null && mc.get(MESSAGE_RESOURCE_PATH_PROPERTY) != null) {
+            return true;
+        }
         return false;
     }
 
@@ -226,8 +231,10 @@ public class RequestDispatcherProvider e
                 return resourcePaths.get(requestPath);
             }
         }
-        // won't happen given that isWriteable() returned true
-        return null;
+        
+        Object resourcePathProp = (String)mc.get(MESSAGE_RESOURCE_PATH_PROPERTY);
+        return resourcePathProp != null ? resourcePathProp.toString() : null;
+        
     }
     
     private String getRequestPath() {



Mime
View raw message