@@ -523,6 +523,9 @@ The following Maven example shows how to exclude Tomcat and include Jetty for Sp
523
523
524
524
[source,xml,indent=0,subs="verbatim,quotes,attributes"]
525
525
----
526
+ <properties>
527
+ <servlet-api.version>3.1.0</servlet-api.version>
528
+ </properties>
526
529
<dependency>
527
530
<groupId>org.springframework.boot</groupId>
528
531
<artifactId>spring-boot-starter-web</artifactId>
@@ -541,6 +544,9 @@ The following Maven example shows how to exclude Tomcat and include Jetty for Sp
541
544
</dependency>
542
545
----
543
546
547
+ NOTE: The version of the Servlet API has been overridden as, unlike Tomcat 9 and Undertow
548
+ 2.0, Jetty 9.4 does not support Servlet 4.0.
549
+
544
550
The following Gradle example shows how to exclude Netty and include Undertow for Spring
545
551
WebFlux:
546
552
@@ -727,16 +733,16 @@ To enable that support, your application needs to have two additional dependenci
727
733
728
734
[[howto-configure-http2-tomcat]]
729
735
==== HTTP/2 with Tomcat
730
- Spring Boot ships by default with Tomcat 8.5.x. With that version, HTTP/2 is only
731
- supported if the `libtcnative` library and its dependencies are installed on the host
732
- operating system.
736
+ Spring Boot ships by default with Tomcat 9.0.x which supports HTTP/2 out of the box when
737
+ using JDK 9 or later. Alternatively, HTTP/2 can be used on JDK 8 if the `libtcnative`
738
+ library and its dependencies are installed on the host operating system.
733
739
734
740
The library folder must be made available, if not already, to the JVM library path. You
735
741
can do so with a JVM argument such as
736
742
`-Djava.library.path=/usr/local/opt/tomcat-native/lib`. More on this in the
737
- https://tomcat.apache.org/tomcat-8.5 -doc/apr.html[official Tomcat documentation].
743
+ https://tomcat.apache.org/tomcat-9.0 -doc/apr.html[official Tomcat documentation].
738
744
739
- Starting Tomcat 8.5.x without that native support logs the following error:
745
+ Starting Tomcat 9.0.x on JDK 8 without that native support logs the following error:
740
746
741
747
[indent=0,subs="attributes"]
742
748
----
@@ -745,10 +751,6 @@ Starting Tomcat 8.5.x without that native support logs the following error:
745
751
746
752
This error is not fatal, and the application still starts with HTTP/1.1 SSL support.
747
753
748
- Running your application with Tomcat 9.0.x and JDK9 does not require any native library to
749
- be installed. To use Tomcat 9, you can override the `tomcat.version` build property with
750
- the version of your choice.
751
-
752
754
753
755
754
756
[[howto-configure-webserver]]
0 commit comments