. 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:
Kevin Roast
2006-05-16 16:22:52 +00:00
parent 7b51096510
commit 76c566db61
7 changed files with 30 additions and 24 deletions

View File

@@ -114,13 +114,13 @@ public class DownloadContentServlet extends BaseServlet
// TODO: add compression here?
// see http://servlets.com/jservlet2/examples/ch06/ViewResourceCompress.java for example
// only really needed if we don't use the built in compression of the servlet container
uri = uri.substring(req.getContextPath().length());
StringTokenizer t = new StringTokenizer(uri, "/");
if (t.countTokens() < 7)
if (t.countTokens() < 6)
{
throw new IllegalArgumentException("Download URL did not contain all required args: " + uri);
}
t.nextToken(); // skip web app name
t.nextToken(); // skip servlet name
String attachToken = t.nextToken();