use of org.olat.core.dispatcher.mapper.MapperDispatcher in project openolat by klemens.
the class OpenOLATServlet method init.
/**
* @see javax.servlet.Servlet#init(javax.servlet.ServletConfig)
*/
@Override
public void init(ServletConfig servletConfig) throws ServletException {
super.init(servletConfig);
requestBasedLogLevelManager = RequestBasedLogLevelManager.getInstance();
if (requestBasedLogLevelManager == null) {
log.info("init: RequestBasedLogLevelManager is not configured on this system.");
} else {
log.info("init: RequestBasedLogLevelManager is configured and will be used.");
}
if (UserBasedLogLevelManager.getInstance() == null) {
log.info("init: UserBasedLogLevelManager is not configured on this system.");
} else {
log.info("init: UserBasedLogLevelManager is configured and will be used.");
}
// the servlet.init method gets called after the spring stuff and all the stuff in web.xml is done
log.info("Framework has started, sending event to listeners of FrameworkStartupEventChannel");
FrameworkStartupEventChannel.fireEvent();
log.info("FrameworkStartupEvent processed by alle listeners. Webapp has started.");
sessionStatsManager = CoreSpringFactory.getImpl(SessionStatsManager.class);
DispatcherModule dispatcherModule = CoreSpringFactory.getImpl(DispatcherModule.class);
dispatchers = new HashMap<>(dispatcherModule.getDispatchers());
dispatchers.put(DispatcherModule.PATH_MAPPED, new MapperDispatcher());
dispatchers.put(DispatcherModule.PATH_GLOBAL_MAPPED, GlobalMapperRegistry.getInstance());
webDAVDispatcher = CoreSpringFactory.getImpl(WebDAVDispatcher.class);
dispatchers.put(DispatcherModule.WEBDAV_PATH, webDAVDispatcher);
Settings settings = CoreSpringFactory.getImpl(Settings.class);
if (StringHelper.containsNonWhitespace(settings.getLegacyContext())) {
legacyContext = settings.getLegacyContext();
// same pattern as dispatcher: /olat/
if (!legacyContext.startsWith("/")) {
legacyContext = "/" + legacyContext;
}
if (!legacyContext.endsWith("/")) {
legacyContext += "/";
}
}
// preload extensions
ExtManager.getInstance().getExtensions();
AbstractSpringModule.printStats();
preWarm();
}
use of org.olat.core.dispatcher.mapper.MapperDispatcher in project OpenOLAT by OpenOLAT.
the class OpenOLATServlet method init.
/**
* @see javax.servlet.Servlet#init(javax.servlet.ServletConfig)
*/
@Override
public void init(ServletConfig servletConfig) throws ServletException {
super.init(servletConfig);
requestBasedLogLevelManager = RequestBasedLogLevelManager.getInstance();
if (requestBasedLogLevelManager == null) {
log.info("init: RequestBasedLogLevelManager is not configured on this system.");
} else {
log.info("init: RequestBasedLogLevelManager is configured and will be used.");
}
if (UserBasedLogLevelManager.getInstance() == null) {
log.info("init: UserBasedLogLevelManager is not configured on this system.");
} else {
log.info("init: UserBasedLogLevelManager is configured and will be used.");
}
// the servlet.init method gets called after the spring stuff and all the stuff in web.xml is done
log.info("Framework has started, sending event to listeners of FrameworkStartupEventChannel");
FrameworkStartupEventChannel.fireEvent();
log.info("FrameworkStartupEvent processed by alle listeners. Webapp has started.");
sessionStatsManager = CoreSpringFactory.getImpl(SessionStatsManager.class);
DispatcherModule dispatcherModule = CoreSpringFactory.getImpl(DispatcherModule.class);
dispatchers = new HashMap<>(dispatcherModule.getDispatchers());
dispatchers.put(DispatcherModule.PATH_MAPPED, new MapperDispatcher());
dispatchers.put(DispatcherModule.PATH_GLOBAL_MAPPED, GlobalMapperRegistry.getInstance());
webDAVDispatcher = CoreSpringFactory.getImpl(WebDAVDispatcher.class);
dispatchers.put(DispatcherModule.WEBDAV_PATH, webDAVDispatcher);
Settings settings = CoreSpringFactory.getImpl(Settings.class);
if (StringHelper.containsNonWhitespace(settings.getLegacyContext())) {
legacyContext = settings.getLegacyContext();
// same pattern as dispatcher: /olat/
if (!legacyContext.startsWith("/")) {
legacyContext = "/" + legacyContext;
}
if (!legacyContext.endsWith("/")) {
legacyContext += "/";
}
}
// preload extensions
ExtManager.getInstance().getExtensions();
AbstractSpringModule.printStats();
preWarm();
}
Aggregations