code: @Override
      public void contextInitialized(ServletContextEvent event) {
          _registry.put(INSTANCE, new Pair<Service, Persistence>(this, null));
  
          _context = event.getServletContext();
          _application = _context.getContextPath();
          _logger.config("application: " + _application);
          if (_application.charAt(0) == '/') _application = _application.substring(1);
  
          try { ManagementFactory.getPlatformMBeanServer().setAttribute(
              new ObjectName("Catalina:host=localhost,name=AccessLogValve,type=Valve"), new Attribute("condition", "intrinsic")
          ); } catch (Exception x) {}
      }
docs: Initializes the servlet context.