Class StartupListener

  • All Implemented Interfaces:
    EventListener, javax.servlet.ServletContextListener

    public class StartupListener
    extends org.springframework.web.context.ContextLoaderListener
    StartupListener class used to initialize the spring context and make it available to the servlet context, so filters that need the spring context can be configured. It also fills in parameters used by the application:
    • Theme (for styling pages)
    • The version number of the application
    • Ontologies that need to be preloaded.
    • Google analytics tracking
    Author:
    keshav, pavlidis, Matt Raible (original version)
    • Field Summary

      • Fields inherited from class org.springframework.web.context.ContextLoader

        CONFIG_LOCATION_PARAM, CONTEXT_CLASS_PARAM, CONTEXT_ID_PARAM, CONTEXT_INITIALIZER_CLASSES_PARAM, GLOBAL_INITIALIZER_CLASSES_PARAM, LOCATOR_FACTORY_KEY_PARAM, LOCATOR_FACTORY_SELECTOR_PARAM
    • Constructor Summary

      Constructors 
      Constructor Description
      StartupListener()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void contextInitialized​(javax.servlet.ServletContextEvent event)  
      protected org.springframework.web.context.WebApplicationContext createWebApplicationContext​(javax.servlet.ServletContext servletContext)  
      • Methods inherited from class org.springframework.web.context.ContextLoaderListener

        contextDestroyed, createContextLoader, getContextLoader
      • Methods inherited from class org.springframework.web.context.ContextLoader

        closeWebApplicationContext, configureAndRefreshWebApplicationContext, createWebApplicationContext, customizeContext, determineContextClass, determineContextInitializerClasses, getCurrentWebApplicationContext, initWebApplicationContext, loadParentContext
    • Constructor Detail

      • StartupListener

        public StartupListener()
    • Method Detail

      • createWebApplicationContext

        protected org.springframework.web.context.WebApplicationContext createWebApplicationContext​(javax.servlet.ServletContext servletContext)
        Overrides:
        createWebApplicationContext in class org.springframework.web.context.ContextLoader
      • contextInitialized

        public void contextInitialized​(javax.servlet.ServletContextEvent event)
        Specified by:
        contextInitialized in interface javax.servlet.ServletContextListener
        Overrides:
        contextInitialized in class org.springframework.web.context.ContextLoaderListener