Class ServletInitializer


  • public abstract class ServletInitializer
    extends Object
    Encapsulates all initialization and configuration needed by the OpenNMS servlets and JSPs.
    Author:
    Lawrence Karnowski , OpenNMS
    • Method Detail

      • init

        public static void init​(javax.servlet.ServletContext context)
                         throws javax.servlet.ServletException
        Initialize servlet and JSP configuration on the first invocation of this method. All other invocations are ignored. This method is synchronized to ensure only the first invocation performs the initialization.

        Call this method in the init method of your servlet or JSP. It will read the servlet initialization parameters from the ServletConfig and ServletContext and OpenNMS configuration files.

        Parameters:
        context - the ServletContext instance in which your servlet is running
        Throws:
        javax.servlet.ServletException - if any.