public static String version = "1.0";
public static ServletContext servletContext;
public static void load(ServletContext sc) {
servletContext = sc;
IConfigData data = null;
try {
String outputClass = sc.getInitParameter("ice.config.output");
Object obj = FieldUtils.loadClass(outputClass);
IConfigParser parser = ConfigParserFactory.getParser(sc.getInitParameter("ice.config.parser"));
if (obj instanceof IConfigData) {
data = (IConfigData) obj;
}
parser.parse(sc, sc.getInitParameter("ice.config.source"), data);
} catch(Exception ex) {
System.out.println("Error while parsing configuration");
ex.printStackTrace();
return;
}
String setupClasses = data.get("setup-classes");
String[] setupClass = setupClasses.split(",");
for(String cls: setupClass) {
if (!cls.isEmpty()) {
try {
Object obj = FieldUtils.loadClass(cls);