Interface ClassLoaderAwareServletContainerInitializer

    • Method Detail

      • onStartup

        default void onStartup​(Set<Class<?>> set,
                               javax.servlet.ServletContext context)
                        throws javax.servlet.ServletException
        Overridden to use different classloaders if needed.

        Specified by:
        onStartup in interface javax.servlet.ServletContainerInitializer
        Throws:
        javax.servlet.ServletException
      • requiresLookup

        default boolean requiresLookup()
        Whether this initializer requires lookup or not.
        Returns:
        whether this initializer requires lookup
      • process

        void process​(Set<Class<?>> classSet,
                     javax.servlet.ServletContext context)
              throws javax.servlet.ServletException
        Implement this method instead of onStartup(Set, ServletContext) to handle classes accessible by different classloaders.
        Parameters:
        classSet - the Set of application classes that extend, implement, or have been annotated with the class types specified by the HandlesTypes annotation, or null if there are no matches, or this ServletContainerInitializer has not been annotated with HandlesTypes
        context - the ServletContext of the web application that is being started and in which the classes contained in classSet were found
        Throws:
        javax.servlet.ServletException - if an error has occurred
        See Also:
        onStartup(Set, ServletContext)