diff --git a/config/alfresco/slingshot-context.xml b/config/alfresco/slingshot-context.xml
index f5be8b754a..274be16aba 100644
--- a/config/alfresco/slingshot-context.xml
+++ b/config/alfresco/slingshot-context.xml
@@ -36,6 +36,9 @@
${vti.server.external.protocol}
+
+ ${vti.server.external.contextPath}
+
diff --git a/source/java/org/alfresco/repo/jscript/app/VtiServerCustomResponse.java b/source/java/org/alfresco/repo/jscript/app/VtiServerCustomResponse.java
index e4a63d6cf0..79f07aa823 100644
--- a/source/java/org/alfresco/repo/jscript/app/VtiServerCustomResponse.java
+++ b/source/java/org/alfresco/repo/jscript/app/VtiServerCustomResponse.java
@@ -42,6 +42,7 @@ public class VtiServerCustomResponse implements CustomResponse
private int vtiServerPort = 0;
private String vtiServerHost;
private String vtiServerProtocol;
+ private String contextPath;
private SysAdminParams sysAdminParams;
private ScriptUtils scriptUtils;
@@ -94,6 +95,16 @@ public class VtiServerCustomResponse implements CustomResponse
{
this.vtiServerProtocol = vtiServerProtocol;
}
+
+ /**
+ * Setter for the vtiServer (external) context path.
+ *
+ * @param contextPath
+ */
+ public void setContextPath(String contextPath)
+ {
+ this.contextPath = contextPath;
+ }
/**
* Populates the DocLib webscript response with custom metadata
@@ -123,6 +134,10 @@ public class VtiServerCustomResponse implements CustomResponse
{
jsonObj.put("protocol", this.vtiServerProtocol);
}
+ if (contextPath != null)
+ {
+ jsonObj.put("contextPath", contextPath);
+ }
return (Serializable)jsonObj;
}
catch (Exception e)