protected Configuration readConfiguration(ServletContext context)
throws ConfigurationException {
// Use StandardCharsets.UTF_8 when we move to Java 7
Charset utf8 = Charset.forName("UTF-8");
PropertiesFileConfiguration systemConfig = new PropertiesFileConfiguration();
systemConfig.setEncoding(utf8);
File configFile = new File(ConfigProperties.DEFAULT_CONFIG_FILE);
if (configFile.canRead()) {
log.debug("Loading system configuration");
// First, read the system configuration
systemConfig.load(configFile);
log.debug("System configuration: " + systemConfig);
}
// load the defaults
MapConfiguration defaults = new MapConfiguration(