Class TomcatServletWebServerFactory

All Implemented Interfaces:
Aware, ConfigurableTomcatWebServerFactory, ConfigurableWebServerFactory, ErrorPageRegistry, WebServerFactory, ConfigurableServletWebServerFactory, ServletWebServerFactory, WebListenerRegistry, ResourceLoaderAware

public class TomcatServletWebServerFactory extends AbstractServletWebServerFactory implements ConfigurableTomcatWebServerFactory, ResourceLoaderAware
AbstractServletWebServerFactory that can be used to create TomcatWebServers. Can be initialized using Spring's ServletContextInitializers or Tomcat LifecycleListeners.

Unless explicitly configured otherwise this factory will create containers that listen for HTTP requests on port 8080.

Phillip Webb, Dave Syer, Brock Mills, Stephane Nicoll, Andy Wilkinson, EddĂș MelĂ©ndez, Christoffer Sawicki, Dawid Antecki, Moritz Halbritter, Scott Frederick
See Also:
  • Field Details


      public static final String DEFAULT_PROTOCOL
      The class name of default protocol used.
      See Also:
  • Constructor Details

    • TomcatServletWebServerFactory

      public TomcatServletWebServerFactory()
      Create a new TomcatServletWebServerFactory instance.
    • TomcatServletWebServerFactory

      public TomcatServletWebServerFactory(int port)
      Create a new TomcatServletWebServerFactory that listens for requests using the specified port.
      port - the port to listen on
    • TomcatServletWebServerFactory

      public TomcatServletWebServerFactory(String contextPath, int port)
      Create a new TomcatServletWebServerFactory with the specified context path and port.
      contextPath - the root context path
      port - the port to listen on
  • Method Details