mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. Fixes to the various servlets to allow any number of elements in the web-app context path
- currently anything other than exactly 1 element (e.g. /alfresco) will fail - now correctly supports any length including the root context of "/" . Clipboard copy/move op correctly uses FileFolderService for folders (which means "Copy of…" gets prepended correctly) . Added more explicit IDs for JbossPortal pages git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2901 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -84,14 +84,14 @@ public class CommandServlet extends BaseServlet
|
||||
return;
|
||||
}
|
||||
|
||||
uri = uri.substring(req.getContextPath().length());
|
||||
StringTokenizer t = new StringTokenizer(uri, "/");
|
||||
int tokenCount = t.countTokens();
|
||||
if (tokenCount < 4)
|
||||
if (tokenCount < 3)
|
||||
{
|
||||
throw new IllegalArgumentException("Command Servlet URL did not contain all required args: " + uri);
|
||||
}
|
||||
|
||||
t.nextToken(); // skip web app name
|
||||
t.nextToken(); // skip servlet name
|
||||
|
||||
// get the command processor to execute the command e.g. "workflow"
|
||||
@@ -101,8 +101,8 @@ public class CommandServlet extends BaseServlet
|
||||
String command = t.nextToken();
|
||||
|
||||
// get any remaining uri elements to pass to the processor
|
||||
String[] args = new String[tokenCount - 4];
|
||||
for (int i=0; i<tokenCount-4; i++)
|
||||
String[] args = new String[tokenCount - 3];
|
||||
for (int i=0; i<tokenCount-3; i++)
|
||||
{
|
||||
args[i] = t.nextToken();
|
||||
}
|
||||
|
Reference in New Issue
Block a user