code: protected void configureContext(Context context,
  			ServletContextInitializer[] initializers) {
  		TomcatStarter starter = new TomcatStarter(initializers);
  		if (context instanceof TomcatEmbeddedContext) {
  			TomcatEmbeddedContext embeddedContext = (TomcatEmbeddedContext) context;
  			embeddedContext.setStarter(starter);
  			embeddedContext.setFailCtxIfServletStartFails(true);
  		}
  		context.addServletContainerInitializer(starter, NO_CLASSES);
  		for (LifecycleListener lifecycleListener : this.contextLifecycleListeners) {
  			context.addLifecycleListener(lifecycleListener);
  		}
  		for (Valve valve : this.contextValves) {
  			context.getPipeline().addValve(valve);
  		}
  		for (ErrorPage errorPage : getErrorPages()) {
  			new TomcatErrorPage(errorPage).addToContext(context);
  		}
  		for (MimeMappings.Mapping mapping : getMimeMappings()) {
  			context.addMimeMapping(mapping.getExtension(), mapping.getMimeType());
  		}
  		configureSession(context);
  		new DisableReferenceClearingContextCustomizer().customize(context);
  		for (TomcatContextCustomizer customizer : this.tomcatContextCustomizers) {
  			customizer.customize(context);
  		}
  	}
docs: Configure the Tomcat {@link Context}.
  @param context the Tomcat context
  @param initializers initializers to apply