mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- AVM Web Script Sample (browse stores, folders, content)
- Fix Web Script issue where urls contained ; (due to tomcat) - Allow AVMScriptStore to be passed through script converters (add serializable) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6071 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -523,8 +523,8 @@ public class TestWebScriptServer
|
||||
req.addParameter(parts[0], (parts.length == 2) ? URLDecoder.decode(parts[1], "UTF-8") : null);
|
||||
}
|
||||
}
|
||||
String pathInfo = iArgIndex == -1 ? uri : uri.substring(0, iArgIndex);
|
||||
req.setPathInfo(URLDecoder.decode(pathInfo, "UTF-8"));
|
||||
String requestURI = "/alfresco/service" + (iArgIndex == -1 ? uri : uri.substring(0, iArgIndex));
|
||||
req.setRequestURI(URLDecoder.decode(requestURI, "UTF-8"));
|
||||
}
|
||||
|
||||
return req;
|
||||
|
@@ -120,8 +120,8 @@ public class WebScriptServletRequest extends WebScriptRequestImpl
|
||||
*/
|
||||
public String getServicePath()
|
||||
{
|
||||
String pathInfo = req.getPathInfo();
|
||||
return getServiceContextPath() + ((pathInfo == null) ? "" : req.getPathInfo());
|
||||
String pathInfo = getPathInfo();
|
||||
return getServiceContextPath() + ((pathInfo == null) ? "" : pathInfo);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
@@ -137,7 +137,10 @@ public class WebScriptServletRequest extends WebScriptRequestImpl
|
||||
*/
|
||||
public String getPathInfo()
|
||||
{
|
||||
return req.getPathInfo();
|
||||
// NOTE: Don't use req.getPathInfo() - it truncates the path at first semi-colon in Tomcat
|
||||
String requestURI = req.getRequestURI();
|
||||
String pathInfo = requestURI.substring(getServiceContextPath().length());
|
||||
return pathInfo;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@@ -101,7 +101,10 @@ public class WebScriptServletRuntime extends WebScriptRuntime
|
||||
@Override
|
||||
protected String getScriptUrl()
|
||||
{
|
||||
return req.getPathInfo();
|
||||
// NOTE: Don't use req.getPathInfo() - it truncates the path at first semi-colon in Tomcat
|
||||
String requestURI = req.getRequestURI();
|
||||
String pathInfo = requestURI.substring((req.getContextPath() + req.getServletPath()).length());
|
||||
return pathInfo;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
Reference in New Issue
Block a user