class ServletDeployer implements ServletContextListener {

    @Override
    public void contextInitialized(ServletContextEvent sce) {
        ServletContext context = sce.getServletContext();
        Collection<DeploymentConfiguration> servletConfigurations = getServletConfigurations(
                context);

        boolean enableServlets = true;
        boolean productionMode = false;
        for (DeploymentConfiguration configuration : servletConfigurations) {
            enableServlets = enableServlets
                    && !configuration.disableAutomaticServletRegistration();
            productionMode = productionMode || configuration.isProductionMode();
        }

        VaadinServletCreation servletCreation = enableServlets
                ? createAppServlet(context)
                : null;

        logServletCreation(servletCreation, context, productionMode);
    }

}