Example usage for javax.servlet ServletRegistration setInitParameters

List of usage examples for javax.servlet ServletRegistration setInitParameters

Introduction

In this page you can find the example usage for javax.servlet ServletRegistration setInitParameters.

Prototype

public Set<String> setInitParameters(Map<String, String> initParameters);

Source Link

Document

Sets the given initialization parameters on the Servlet or Filter that is represented by this Registration.

Usage

From source file:org.springframework.boot.autoconfigure.jersey.JerseyAutoConfiguration.java

@Override
public void setServletContext(ServletContext servletContext) {
    String servletRegistrationName = getServletRegistrationName();
    ServletRegistration registration = servletContext.getServletRegistration(servletRegistrationName);
    if (registration != null) {
        if (logger.isInfoEnabled()) {
            logger.info(//  w  w w  .jav  a2s  . co m
                    "Configuring existing registration for Jersey servlet '" + servletRegistrationName + "'");
        }
        registration.setInitParameters(this.jersey.getInit());
        registration.setInitParameter(CommonProperties.METAINF_SERVICES_LOOKUP_DISABLE,
                Boolean.TRUE.toString());
    }
}