source: ComponentRegistry/branches/ComponentRegistry-2.0/ComponentRegistry/src/main/webapp/compRegConfig.jsp @ 6878

Last change on this file since 6878 was 6878, checked in by Twan Goosen, 8 years ago

loglevel can be set through query parameter

File size: 744 bytes
Line 
1<%-- Configuration hosted next to the front end index page, from which it is loaded --%>
2<%@ page import="java.net.URI" %>
3<%
4    final String loglevelParam = request.getParameter("loglevel");
5    final String loglevel;
6    if(loglevelParam != null) {
7        loglevel = loglevelParam;
8    } else {
9        loglevel = "info" ;
10    }
11%>
12{
13  "loglevel": "<%= loglevel %>",
14  "cors": false,
15  "REST": {
16    "url": "<%= application.getInitParameter("eu.clarin.cmdi.componentregistry.serviceRootUrl") %>"
17  },
18  "deploy": {
19    "path": "<%= 
20                URI.create(application.getInitParameter("eu.clarin.cmdi.componentregistry.serviceRootUrl"))
21                        .getPath() //at same URL as app, so simply take path
22            %>"
23  }
24}
Note: See TracBrowser for help on using the repository browser.