Interface ConfigurableServletWebServerFactory
- All Superinterfaces:
- ConfigurableWebServerFactory, ErrorPageRegistry, ServletWebServerFactory, WebListenerRegistry, WebServerFactory
- All Known Implementing Classes:
- JettyServletWebServerFactory, TomcatServletWebServerFactory
public interface ConfigurableServletWebServerFactory
extends ConfigurableWebServerFactory, ServletWebServerFactory, WebListenerRegistry
A configurable 
ServletWebServerFactory.- Since:
- 4.0.0
- Author:
- Dave Syer, Andy Wilkinson, Stephane Nicoll, EddĂș MelĂ©ndez, Brian Clozel
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptiondefault voidaddCookieSameSiteSuppliers(CookieSameSiteSupplier... cookieSameSiteSuppliers) AddCookieSameSiteSuppliersto those that should be used to obtain theCookie.SameSiteattribute of any added cookie.default voidaddInitializers(ServletContextInitializer... initializers) AddServletContextInitializers to those that should be applied in addition toServletWebServerFactory.getWebServer(ServletContextInitializer...)parameters.default voidaddMimeMappings(MimeMappings mimeMappings) Adds mime-type mappings.default voidaddWebListeners(String... webListenerClassNames) Adds web listeners that will be registered with the servlet web server.default StringReturns the context path for the servlet web server.default voidsetContextPath(String contextPath) Sets the context path for the web server.default voidsetCookieSameSiteSuppliers(List<? extends CookieSameSiteSupplier> cookieSameSiteSuppliers) SetsCookieSameSiteSuppliersthat should be used to obtain theCookie.SameSiteattribute of any added cookie.default voidsetDisplayName(String displayName) Sets the display name of the application deployed in the web server.default voidsetDocumentRoot(@Nullable File documentRoot) Sets the document root directory which will be used by the web context to serve static files.default voidsetInitializers(List<? extends ServletContextInitializer> initializers) SetsServletContextInitializerthat should be applied in addition toServletWebServerFactory.getWebServer(ServletContextInitializer...)parameters.default voidsetInitParameters(Map<String, String> initParameters) Sets the init parameters that are applied to the container'sServletContext.default voidSets the configuration that will be applied to the server's JSP servlet.default voidsetLocaleCharsetMappings(Map<Locale, Charset> localeCharsetMappings) Sets the Locale to Charset mappings.default voidsetMimeMappings(MimeMappings mimeMappings) Sets the mime-type mappings.default voidsetRegisterDefaultServlet(boolean registerDefaultServlet) Set if the DefaultServlet should be registered.default voidsetSession(Session session) Sets the configuration that will be applied to the container's HTTP session support.Methods inherited from interface ConfigurableWebServerFactorysetAddress, setCompression, setErrorPages, setHttp2, setPort, setServerHeader, setShutdown, setSsl, setSslBundlesMethods inherited from interface ErrorPageRegistryaddErrorPagesMethods inherited from interface ServletWebServerFactorygetWebServer
- 
Method Details- 
getSettingsServletWebServerSettings getSettings()
- 
setContextPathSets the context path for the web server. The context should start with a "/" character but not end with a "/" character. The default context path can be specified using an empty string.- Parameters:
- contextPath- the context path to set
 
- 
getContextPathReturns the context path for the servlet web server.- Returns:
- the context path
 
- 
setDisplayNameSets the display name of the application deployed in the web server.- Parameters:
- displayName- the displayName to set
 
- 
setSessionSets the configuration that will be applied to the container's HTTP session support.- Parameters:
- session- the session configuration
 
- 
setRegisterDefaultServletdefault void setRegisterDefaultServlet(boolean registerDefaultServlet) Set if the DefaultServlet should be registered. Defaults tofalsesince 2.4.- Parameters:
- registerDefaultServlet- if the default servlet should be registered
 
- 
setMimeMappingsSets the mime-type mappings.- Parameters:
- mimeMappings- the mime type mappings (defaults to- MimeMappings.DEFAULT)
 
- 
addMimeMappingsAdds mime-type mappings.- Parameters:
- mimeMappings- the mime type mappings to add
 
- 
setDocumentRootSets the document root directory which will be used by the web context to serve static files.- Parameters:
- documentRoot- the document root or- nullif not required
 
- 
setInitializersSetsServletContextInitializerthat should be applied in addition toServletWebServerFactory.getWebServer(ServletContextInitializer...)parameters. This method will replace any previously set or added initializers.- Parameters:
- initializers- the initializers to set
- See Also:
 
- 
addInitializersAddServletContextInitializers to those that should be applied in addition toServletWebServerFactory.getWebServer(ServletContextInitializer...)parameters.- Parameters:
- initializers- the initializers to add
- See Also:
 
- 
setJspSets the configuration that will be applied to the server's JSP servlet.- Parameters:
- jsp- the JSP servlet configuration
 
- 
setLocaleCharsetMappings
- 
setInitParametersSets the init parameters that are applied to the container'sServletContext.- Parameters:
- initParameters- the init parameters
 
- 
setCookieSameSiteSuppliersdefault void setCookieSameSiteSuppliers(List<? extends CookieSameSiteSupplier> cookieSameSiteSuppliers) SetsCookieSameSiteSuppliersthat should be used to obtain theCookie.SameSiteattribute of any added cookie. This method will replace any previously set or added suppliers.- Parameters:
- cookieSameSiteSuppliers- the suppliers to add
- See Also:
 
- 
addCookieSameSiteSuppliersAddCookieSameSiteSuppliersto those that should be used to obtain theCookie.SameSiteattribute of any added cookie.- Parameters:
- cookieSameSiteSuppliers- the suppliers to add
- See Also:
 
- 
addWebListenersDescription copied from interface:WebListenerRegistryAdds web listeners that will be registered with the servlet web server.- Specified by:
- addWebListenersin interface- WebListenerRegistry
- Parameters:
- webListenerClassNames- the class names of the web listeners
 
 
-