code: Configuration initConfig(ServletConfig pConfig) {
          Configuration config = new Configuration(
                  ConfigKey.AGENT_ID, NetworkUtil.getAgentId(hashCode(),"servlet"));
          // From ServletContext ....
          config.updateGlobalConfiguration(new ServletConfigFacade(pConfig));
          // ... and ServletConfig
          config.updateGlobalConfiguration(new ServletContextFacade(getServletContext()));
  
          // Set type last and overwrite anything written
          config.updateGlobalConfiguration(Collections.singletonMap(ConfigKey.AGENT_TYPE.getKeyValue(),"servlet"));
          return config;
      }
docs: Configuration from the servlet context overrides servlet parameters defined in web.xml