Ignore:
Timestamp:
01/08/16 09:12:35 (8 years ago)
Author:
Twan Goosen
Message:

static getApplicationBaseURI method, now called from JSP configuration template. Fixes #844

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/branches/ComponentRegistry-2.0/ComponentRegistry/src/main/webapp/compRegConfig.jsp

    r6885 r6890  
    11<%-- Configuration hosted next to the front end index page, from which it is loaded --%>
    22<%@ page import="java.net.URI" %>
     3<%@ page import="clarin.cmdi.componentregistry.rest.ComponentRegistryRestService" %>
    34<%
    45    final String loglevelParam = request.getParameter("loglevel");
     
    910        loglevel = "info" ;
    1011    }
     12   
     13    final String appUrl = ComponentRegistryRestService.getApplicationBaseURI(getServletContext(), request);
    1114%>
    1215{
     
    1417  "cors": false,
    1518  "REST": {
    16     "url": "<%= application.getInitParameter("eu.clarin.cmdi.componentregistry.serviceRootUrl") %>"
     19    "url": "<%= appUrl %>"
    1720  },
    1821  "backEndVersion": "${project.version}",
     
    2023  "deploy": {
    2124    "path": "<%=
    22                 URI.create(application.getInitParameter("eu.clarin.cmdi.componentregistry.serviceRootUrl"))
    23                         .getPath() //at same URL as app, so simply take path
     25                URI.create(appUrl).getPath() //at same URL as app, so simply take path
    2426            %>"
    2527  }
Note: See TracChangeset for help on using the changeset viewer.