protected void init(ServletContext servletContext, String configPath) throws IOException, SAXException {
String path = configuration.getGraniteConfig();
if (path == null)
path = GRANITE_CONFIG_DEFAULT;
InputStream is = servletContext.getResourceAsStream(path);
if (is == null) {
log.warn("Could not load custom granite-config.xml: %s (file does not exists)", path);
path = null;
}
this.graniteConfig = new GraniteConfig(configPath, is, null, null);
ServletGraniteConfig.loadConfig(servletContext, graniteConfig);
path = configuration.getFlexServicesConfig();
if (path == null)
path = SERVICES_CONFIG_DEFAULT;
is = servletContext.getResourceAsStream(path);
if (is == null) {
log.warn("Could not load custom services-config.xml: %s (file does not exists)", path);
path = null;
}
this.servicesConfig = new ServicesConfig(is, null, false);
ServletServicesConfig.loadConfig(servletContext, servicesConfig);
}