Skip to content

Commit aecdda1

Browse files
author
Vladimir Kotal
committed
bail deploy if CONFIGURATION is not present
1 parent 5c931ce commit aecdda1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

opengrok-web/src/main/java/org/opengrok/web/WebappListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public void contextInitialized(final ServletContextEvent servletContextEvent) {
6868

6969
String config = context.getInitParameter("CONFIGURATION");
7070
if (config == null) {
71-
LOGGER.severe("CONFIGURATION section missing in web.xml");
71+
throw new Error("CONFIGURATION parameter missing in the web.xml file");
7272
} else {
7373
try {
7474
env.readConfiguration(new File(config), true);

opengrok-web/src/main/webapp/error.jsp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,11 @@ include file="pageheader.jspf"
6060
PageConfig cfg = PageConfig.get(request);
6161
String configError = "";
6262
if (cfg.getSourceRootPath() == null || cfg.getSourceRootPath().isEmpty()) {
63-
configError = "CONFIGURATION parameter has not been configured in "
64-
+ "web.xml! Please configure your webapp.";
63+
configError = "The source root path has not been configured ! "
64+
+ " Please configure your webapp.";
6565
} else if (!cfg.getEnv().getSourceRootFile().isDirectory()) {
66-
configError = "The source root specified in your configuration does "
66+
configError = "The source root " + cfg.getEnv().getSourceRootPath()
67+
+ " specified in your configuration does "
6768
+ "not point to a valid directory! Please configure your webapp.";
6869
}
6970
%><h3 class="error">There was an error!</h3>

0 commit comments

Comments
 (0)