diff --git a/config/alfresco/action-services-context.xml b/config/alfresco/action-services-context.xml
index fd5f2daeda..37149c8cdc 100644
--- a/config/alfresco/action-services-context.xml
+++ b/config/alfresco/action-services-context.xml
@@ -426,6 +426,18 @@
+
+
+
+
+
+
+
+ org.springframework.mail.javamail.JavaMailSender
+
+
+
+
false
@@ -517,8 +529,8 @@
/${spaces.company_home.childname}
-
- ${web.application.context.url}
+
+
diff --git a/config/alfresco/repository.properties b/config/alfresco/repository.properties
index 3a25f24dd6..0dac9069d4 100644
--- a/config/alfresco/repository.properties
+++ b/config/alfresco/repository.properties
@@ -6,8 +6,6 @@ repository.name=Main Repository
dir.root=./alf_data
-web.application.context.url=http://localhost:8080/alfresco
-
dir.contentstore=${dir.root}/contentstore
dir.contentstore.deleted=${dir.root}/contentstore.deleted
diff --git a/source/java/org/alfresco/repo/action/executer/ScriptActionExecuter.java b/source/java/org/alfresco/repo/action/executer/ScriptActionExecuter.java
index d58033fa28..ca6bb2701b 100644
--- a/source/java/org/alfresco/repo/action/executer/ScriptActionExecuter.java
+++ b/source/java/org/alfresco/repo/action/executer/ScriptActionExecuter.java
@@ -24,6 +24,7 @@ import java.util.Map;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.ParameterDefinitionImpl;
+import org.alfresco.repo.admin.SysAdminParams;
import org.alfresco.repo.jscript.ScriptAction;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.action.Action;
@@ -48,11 +49,11 @@ public class ScriptActionExecuter extends ActionExecuterAbstractBase
public static final String PARAM_SCRIPTREF = "script-ref";
private ServiceRegistry serviceRegistry;
+ private SysAdminParams sysAdminParams;
private PersonService personService;
private String companyHomePath;
private StoreRef storeRef;
private ScriptLocation scriptLocation;
- private String webApplicationContextUrl;
/**
* @param serviceRegistry The serviceRegistry to set.
@@ -62,6 +63,14 @@ public class ScriptActionExecuter extends ActionExecuterAbstractBase
this.serviceRegistry = serviceRegistry;
}
+ /**
+ * @param sysAdminParams The sysAdminParams to set.
+ */
+ public void setSysAdminParams(SysAdminParams sysAdminParams)
+ {
+ this.sysAdminParams = sysAdminParams;
+ }
+
/**
* @param personService The personService to set.
*/
@@ -90,16 +99,6 @@ public class ScriptActionExecuter extends ActionExecuterAbstractBase
this.scriptLocation = scriptLocation;
}
- /**
- * Set the web application context url
- *
- * @param webApplicationContextUrl web application context url
- */
- public void setWebApplicationContextUrl(String webApplicationContextUrl)
- {
- this.webApplicationContextUrl = webApplicationContextUrl;
- }
-
/**
* Allow adhoc properties to be passed to this action
*
@@ -155,7 +154,7 @@ public class ScriptActionExecuter extends ActionExecuterAbstractBase
ScriptAction scriptAction = new ScriptAction(this.serviceRegistry, action, this.actionDefinition);
model.put("action", scriptAction);
- model.put("webApplicationContextUrl", webApplicationContextUrl);
+ model.put("webApplicationContextUrl", sysAdminParams.getAlfrescoProtocol() + "://" + sysAdminParams.getAlfrescoHost() + ":" + sysAdminParams.getAlfrescoPort() + "/" + sysAdminParams.getAlfrescoContext());
Object result = null;
if (this.scriptLocation == null)