use of javax.servlet.ServletRegistration.Dynamic in project spring-boot by spring-projects.
the class ServletRegistrationBean method onStartup.
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
Assert.notNull(this.servlet, "Servlet must not be null");
String name = getServletName();
if (!isEnabled()) {
logger.info("Servlet " + name + " was not registered (disabled)");
return;
}
logger.info("Mapping servlet: '" + name + "' to " + this.urlMappings);
Dynamic added = servletContext.addServlet(name, this.servlet);
if (added == null) {
logger.info("Servlet " + name + " was not registered " + "(possibly already registered?)");
return;
}
configure(added);
}
Aggregations