public Class<?> getMainModule() {
String name = Strings.trim(getInitParameter("modules"));
try {
Class<?> mainModule = null;
if (Strings.isBlank(name))
throw new NutConfigException("You need declare 'modules' parameter in your context configuration file or web.xml ! Only found -> " + getInitParameterNames());
mainModule = Lang.loadClass(name);
log.debugf("MainModule: <%s>", mainModule.getName());
return mainModule;
}
catch (NutConfigException e) {
throw e;
}
catch (Exception e) {
throw new NutConfigException(e);
}
}