From 9c00c3fcfb8ccf0a62eaac464e1ade920865c819 Mon Sep 17 00:00:00 2001 From: "Donald J. Brown" Date: Sat, 16 Feb 2008 14:03:26 +0000 Subject: [PATCH] Adding support for always select full namespace WW-2428 git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@628299 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/struts2/rest/RestActionMapper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java index 2481f6bbe..bb109f3d7 100644 --- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java +++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionMapper.java @@ -279,6 +279,10 @@ public class RestActionMapper extends DefaultActionMapper { // namespace anyway if not found in root namespace. namespace = "/"; name = uri.substring(lastSlash + 1); + } else if (alwaysSelectFullNamespace) { + // Simply select the namespace as everything before the last slash + namespace = uri.substring(0, lastSlash); + name = uri.substring(lastSlash + 1); } else { // Try to find the namespace in those defined, defaulting to "" Configuration config = configManager.getConfiguration();