}
public void init(final Config config) {
String value = config.getInitParameter("modules");
if (value==null)
throw new ConfigException("Init guice failed. Missing parameter '<modules>'.");
String[] ss = value.split(",");
List<Module> moduleList = new ArrayList<Module>(ss.length);
for (String s : ss) {
Module m = initModule(s, config.getServletContext());
if (m!=null)
moduleList.add(m);
}
if (moduleList.isEmpty())
throw new ConfigException("No module found.");
this.injector = Guice.createInjector(Stage.PRODUCTION, moduleList);
config.getServletContext().setAttribute(Injector.class.getName(), this.injector);
}