diff --git a/cadc-rest/build.gradle b/cadc-rest/build.gradle index 970d4e7f..c948a6d2 100644 --- a/cadc-rest/build.gradle +++ b/cadc-rest/build.gradle @@ -16,7 +16,7 @@ sourceCompatibility = 1.8 group = 'org.opencadc' -version = '1.3.18' +version = '1.3.19' description = 'OpenCADC REST server library' def git_url = 'https://github.com/opencadc/core' diff --git a/cadc-rest/src/main/java/ca/nrc/cadc/rest/RestServlet.java b/cadc-rest/src/main/java/ca/nrc/cadc/rest/RestServlet.java index c5f9d7df..c704193b 100644 --- a/cadc-rest/src/main/java/ca/nrc/cadc/rest/RestServlet.java +++ b/cadc-rest/src/main/java/ca/nrc/cadc/rest/RestServlet.java @@ -150,7 +150,8 @@ public void init(ServletConfig config) throws ServletException { this.deleteAction = loadAction(config, "delete"); this.headAction = loadAction(config, "head"); - this.appName = config.getServletContext().getServletContextName(); + // appName: war file foo#bar.war, context path /foo/bar -> foo-bar + this.appName = config.getServletContext().getContextPath().substring(1).replaceAll("/", "-"); this.componentID = appName + "." + config.getServletName(); String augment = config.getInitParameter(AUGMENT_SUBJECT_PARAM); if (augment != null && augment.equalsIgnoreCase(Boolean.FALSE.toString())) {