diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java index adc8a2a55eb8326ace6b99470e66d3e4fdf49ad5..f74eb3bfbacfbbcc80dbbcffc9deb14e77341028 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/Dict.java @@ -37,6 +37,8 @@ public abstract class Dict // Can not be instantiated. } + public static final String DEPLOYED_APPLICATION_NAME = "deployedAppName"; + public static final String SPRING_APPLICATION_NAME = "springApplicationName"; public static final String APPLICATION_NAME = "applicationName"; diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GenericConstants.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GenericConstants.java index eb37b76e1e0e9fa6305302eb74218ee9afe60809..52a016ba3337c8f74f5aed0c066f7b69501e87b1 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GenericConstants.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/GenericConstants.java @@ -41,7 +41,9 @@ public final class GenericConstants */ public static final String ID_PREFIX = "openbis_"; - private static final String APPLICATION_NAME = Dictionary.getDictionary("common").get(Dict.SPRING_APPLICATION_NAME); + private static final String DEPLOYED_APPLICATION_NAME = Dictionary.getDictionary("common").get(Dict.DEPLOYED_APPLICATION_NAME); + + private static final String SPRING_APPLICATION_NAME = Dictionary.getDictionary("common").get(Dict.SPRING_APPLICATION_NAME); public static final String COMMON_SERVER_NAME = createServicePath("common"); @@ -50,9 +52,13 @@ public final class GenericConstants */ public final static String createServicePath(final String serviceName) { - // Kind of hack. Unclear why an additional APPLICATION_NAME in productive mode is needed. - return "/" + APPLICATION_NAME + "/" + (GWT.isScript() ? APPLICATION_NAME + "/" : "") - + serviceName; + if (GWT.isProdMode()) // Is Production + { + return "/" + DEPLOYED_APPLICATION_NAME + "/" + SPRING_APPLICATION_NAME + "/" + serviceName; + } else + { + return "/" + SPRING_APPLICATION_NAME + "/" + serviceName; + } } /** Name of the servlet to download an experiment attachment. */ diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js index 52a18e9704d4fc65a705f7e7f7258b0a945eb083..2f01cada427e7a4a733b89303f23321cf54b7056 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js +++ b/openbis/source/java/ch/systemsx/cisd/openbis/public/common-dictionary.js @@ -7,7 +7,7 @@ entityTypes.experiment = "Experiment"; entityTypes.experiments = entityTypes.experiment + "s"; var common = { - + deployedAppName: "openbis", springApplicationName: "openbis", applicationName: "openBIS", openbis_instance: "",