Klasse ServletContextListenerUtil

java.lang.Object
org.joinfaces.servlet.ServletContextListenerUtil

public final class ServletContextListenerUtil extends Object
Helper class for Servlet Context Listeners.

The main feature of this class is the way it registers listeners. They will be treated as if they were declared in a non-programatic way and therefore aren't affected by the restrictions of Section 4.4 of the Servlet Specification.

  • Methodendetails

    • addListeners

      public static void addListeners(ConfigurableServletWebServerFactory factory, Collection<Class<? extends EventListener>> listeners)
      Adds the given listener classes to the given Web server.
      Parameter:
      factory - The factory for the WebServer to add the listeners to.
      listeners - The listeners to add.