aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-application/src/main
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-10 13:59:28 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2014-06-10 13:59:28 +0200
commit4fbd4f81c3ec8dd6e0f86a37136eb56b8974ea1c (patch)
tree57b8ecc4b1735df89d4cac72b037b3d12a1f89be /sonar-application/src/main
parentc83044b1896c686b1d8283877c0414eb20238efb (diff)
downloadsonarqube-4fbd4f81c3ec8dd6e0f86a37136eb56b8974ea1c.tar.gz
sonarqube-4fbd4f81c3ec8dd6e0f86a37136eb56b8974ea1c.zip
Fix documentation of sonar.web.context in conf/sonar.properties
Diffstat (limited to 'sonar-application/src/main')
-rw-r--r--sonar-application/src/main/assembly/conf/sonar.properties2
-rw-r--r--sonar-application/src/main/java/org/sonar/application/Webapp.java5
2 files changed, 3 insertions, 4 deletions
diff --git a/sonar-application/src/main/assembly/conf/sonar.properties b/sonar-application/src/main/assembly/conf/sonar.properties
index 65954622bb9..6c058aa3227 100644
--- a/sonar-application/src/main/assembly/conf/sonar.properties
+++ b/sonar-application/src/main/assembly/conf/sonar.properties
@@ -82,7 +82,7 @@ sonar.jdbc.timeBetweenEvictionRunsMillis=30000
# Web context. When set, it must start with forward slash (for example /sonarqube).
# The default value is root context (empty value).
-#sonar.web.context=/
+#sonar.web.context=
# TCP port for incoming HTTP connections. Disabled when value is -1.
#sonar.web.port=9000
diff --git a/sonar-application/src/main/java/org/sonar/application/Webapp.java b/sonar-application/src/main/java/org/sonar/application/Webapp.java
index cda49acd69e..8d5f5a4590a 100644
--- a/sonar-application/src/main/java/org/sonar/application/Webapp.java
+++ b/sonar-application/src/main/java/org/sonar/application/Webapp.java
@@ -32,9 +32,8 @@ class Webapp {
private static final String PROPERTY_LOG_CONSOLE = "sonar.log.console";
static void configure(Tomcat tomcat, Env env, Props props) {
- String ctx = getContext(props);
try {
- Context context = tomcat.addWebapp(ctx, env.file("web").getAbsolutePath());
+ Context context = tomcat.addWebapp(getContextPath(props), env.file("web").getAbsolutePath());
context.setConfigFile(env.file("web/META-INF/context.xml").toURI().toURL());
context.addParameter(PROPERTY_LOG_PROFILING_LEVEL, props.of(PROPERTY_LOG_PROFILING_LEVEL, "NONE"));
context.addParameter(PROPERTY_LOG_CONSOLE, props.of(PROPERTY_LOG_CONSOLE, "false"));
@@ -46,7 +45,7 @@ class Webapp {
}
}
- static String getContext(Props props) {
+ static String getContextPath(Props props) {
String context = props.of(PROPERTY_CONTEXT, "");
if ("/".equals(context)) {
context = "";