TomcatServletWebServerFactory
open class TomcatServletWebServerFactory : AbstractServletWebServerFactory, 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.
Author
Phillip Webb
Dave Syer
Brock Mills
Stephane Nicoll
Andy Wilkinson
Eddú Meléndez
Christoffer Sawicki
Dawid Antecki
Moritz Halbritter
Scott Frederick
Since
2.0.0
See also
Constructors
Link copied to clipboard
constructor()
Create a new TomcatServletWebServerFactory instance.
Create a new TomcatServletWebServerFactory that listens for requests using the specified port.
Create a new TomcatServletWebServerFactory with the specified context path and port.
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
The class name of default protocol used.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Functions
Link copied to clipboard
Add Connectors in addition to the default connector, e.g.
Link copied to clipboard
Add TomcatConnectorCustomizers that should be added to the Tomcat Connector.
Link copied to clipboard
Add TomcatContextCustomizers that should be added to the Tomcat Context.
Link copied to clipboard
Add LifecycleListeners that should be added to the Tomcat Context.
Link copied to clipboard
Add Valves that should be applied to the Tomcat Context.
Link copied to clipboard
Add CookieSameSiteSuppliers to those that should be used to obtain the SameSite attribute of any added cookie.
Link copied to clipboard
Add Valves that should be applied to the Tomcat Engine.
Link copied to clipboard
Adds error pages that will be used when handling exceptions.
Link copied to clipboard
Add ServletContextInitializers to those that should be applied in addition to getWebServer parameters.
Link copied to clipboard
Adds mime-type mappings.
Link copied to clipboard
open fun addProtocolHandlerCustomizers(tomcatProtocolHandlerCustomizers: Array<TomcatProtocolHandlerCustomizer<out Any>>)
Add TomcatProtocolHandlerCustomizers that should be added to the Tomcat Connector.
Link copied to clipboard
Add patterns that match jars to ignore for TLD scanning.
Link copied to clipboard
Adds web listeners that will be registered with the servlet container.
Link copied to clipboard
Returns a mutable collection of the LifecycleListeners that will be applied to the Tomcat Context.
Link copied to clipboard
Returns a mutable collection of the Valves that will be applied to the Tomcat Context.
Link copied to clipboard
Returns the document root which will be used by the web context to serve static files.
Link copied to clipboard
Returns a mutable collection of the Valves that will be applied to the Tomcat Engine.
Link copied to clipboard
Returns a mutable collection of the TomcatConnectorCustomizers that will be applied to the Tomcat Connector.
Link copied to clipboard
Returns a mutable collection of the TomcatContextCustomizers that will be applied to the Tomcat Context.
Link copied to clipboard
open fun getTomcatProtocolHandlerCustomizers(): Collection<TomcatProtocolHandlerCustomizer<out Any>>
Returns a mutable collection of the TomcatProtocolHandlerCustomizers that will be applied to the Tomcat Connector.
Link copied to clipboard
Gets a new fully configured but paused WebServer instance.
Link copied to clipboard
Flag to indicate that the default servlet should be registered.
Link copied to clipboard
Sets the background processor delay in seconds.
Link copied to clipboard
Set the Tomcat base directory.
Link copied to clipboard
Set LifecycleListeners that should be applied to the Tomcat Context.
Link copied to clipboard
Set Valves that should be applied to the Tomcat Context.
Link copied to clipboard
Sets CookieSameSiteSuppliers that should be used to obtain the SameSite attribute of any added cookie.
Link copied to clipboard
Set whether the factory should disable Tomcat's MBean registry prior to creating the server.
Link copied to clipboard
Sets the document root directory which will be used by the web context to serve static files.
Link copied to clipboard
Set Valves that should be applied to the Tomcat Engine.
Link copied to clipboard
Sets the error pages that will be used when handling exceptions.
Link copied to clipboard
Sets ServletContextInitializer that should be applied in addition to getWebServer parameters.
Link copied to clipboard
The Tomcat protocol to use when create the Connector.
Link copied to clipboard
Set if the DefaultServlet should be registered.
Link copied to clipboard
Link copied to clipboard
Set the patterns that match jars to ignore for TLD scanning.
Link copied to clipboard
open fun setTomcatConnectorCustomizers(tomcatConnectorCustomizers: Collection<out TomcatConnectorCustomizer>)
Set TomcatConnectorCustomizers that should be applied to the Tomcat Connector.
Link copied to clipboard
open fun setTomcatContextCustomizers(tomcatContextCustomizers: Collection<out TomcatContextCustomizer>)
Set TomcatContextCustomizers that should be applied to the Tomcat Context.
Link copied to clipboard
open fun setTomcatProtocolHandlerCustomizers(tomcatProtocolHandlerCustomizer: Collection<out TomcatProtocolHandlerCustomizer<out Any>>)
Set TomcatProtocolHandlerCustomizers that should be applied to the Tomcat Connector.