public ServletContextImpl(final ServletContainer servletContainer, final Deployment deployment) {
this.servletContainer = servletContainer;
this.deployment = deployment;
this.deploymentInfo = deployment.getDeploymentInfo();
sessionCookieConfig = new SessionCookieConfigImpl(this);
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());
sessionCookieConfig.setPath(sc.getPath());
sessionCookieConfig.setSecure(sc.isSecure());
if (sc.getSessionTrackingModes() != null) {
defaultSessionTrackingModes = sessionTrackingModes = new HashSet<SessionTrackingMode>(sc.getSessionTrackingModes());
}
}
if (deploymentInfo.getServletContextAttributeBackingMap() == null) {
this.attributes = new ConcurrentHashMap<String, Object>();
} else {