public void handleDeploymentSessionConfig(
     DeploymentInfo deploymentInfo, ServletContextImpl servletContext) {
   SessionCookieConfigImpl sessionCookieConfig = servletContext.getSessionCookieConfig();
   ServletSessionConfig sc = deploymentInfo.getServletSessionConfig();
   if (sc != null) {
     sessionCookieConfig.setName(sc.getName());
     sessionCookieConfig.setComment(sc.getComment());
     sessionCookieConfig.setDomain(sc.getDomain());
     sessionCookieConfig.setHttpOnly(sc.isHttpOnly());
     sessionCookieConfig.setMaxAge(sc.getMaxAge());
     if (sc.getPath() != null) {
       sessionCookieConfig.setPath(sc.getPath());
     } else {
       sessionCookieConfig.setPath(deploymentInfo.getContextPath());
     }
     sessionCookieConfig.setSecure(sc.isSecure());
     if (sc.getSessionTrackingModes() != null) {
       servletContext.setDefaultSessionTrackingModes(new HashSet<>(sc.getSessionTrackingModes()));
     }
   }
 }
 public void setDefaultSessionTrackingModes(HashSet<SessionTrackingMode> sessionTrackingModes) {
   context.setDefaultSessionTrackingModes(sessionTrackingModes);
 }