Skip to content

Commit 56595c0

Browse files
committed
Use consistent case for 'Servlet' and 'Filter' in documentation
Closes gh-27896
1 parent 3884ec3 commit 56595c0

File tree

12 files changed

+39
-39
lines changed

12 files changed

+39
-39
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/actuator/endpoints.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ For example, `@WebEndpoint` is exposed only over HTTP and not over JMX.
455455
You can write technology-specific extensions by using `@EndpointWebExtension` and `@EndpointJmxExtension`.
456456
These annotations let you provide technology-specific operations to augment an existing endpoint.
457457

458-
Finally, if you need access to web-framework-specific functionality, you can implement Servlet or Spring `@Controller` and `@RestController` endpoints at the cost of them not being available over JMX or when using a different web framework.
458+
Finally, if you need access to web-framework-specific functionality, you can implement servlet or Spring `@Controller` and `@RestController` endpoints at the cost of them not being available over JMX or when using a different web framework.
459459

460460

461461

@@ -598,9 +598,9 @@ The latter is typically used to perform authorization checks by using its `isUse
598598

599599
[[actuator.endpoints.implementing-custom.servlet]]
600600
==== Servlet Endpoints
601-
A `Servlet` can be exposed as an endpoint by implementing a class annotated with `@ServletEndpoint` that also implements `Supplier<EndpointServlet>`.
601+
A servlet can be exposed as an endpoint by implementing a class annotated with `@ServletEndpoint` that also implements `Supplier<EndpointServlet>`.
602602
Servlet endpoints provide deeper integration with the servlet container but at the expense of portability.
603-
They are intended to be used to expose an existing `Servlet` as an endpoint.
603+
They are intended to be used to expose an existing servlet as an endpoint.
604604
For new endpoints, the `@Endpoint` and `@WebEndpoint` annotations should be preferred whenever possible.
605605

606606

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ include::{docs-java}/features/developingautoconfiguration/testing/MyConditionEva
190190

191191
[[features.developing-auto-configuration.testing.simulating-a-web-context]]
192192
==== Simulating a Web Context
193-
If you need to test an auto-configuration that only operates in a Servlet or Reactive web application context, use the `WebApplicationContextRunner` or `ReactiveWebApplicationContextRunner` respectively.
193+
If you need to test an auto-configuration that only operates in a servlet or reactive web application context, use the `WebApplicationContextRunner` or `ReactiveWebApplicationContextRunner` respectively.
194194

195195

196196

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/testing.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ include::{docs-java}/features/testing/springbootapplications/withmockenvironment
192192

193193
[TIP]
194194
====
195-
Testing within a mocked environment is usually faster than running with a full Servlet container.
196-
However, since mocking occurs at the Spring MVC layer, code that relies on lower-level Servlet container behavior cannot be directly tested with MockMvc.
195+
Testing within a mocked environment is usually faster than running with a full servlet container.
196+
However, since mocking occurs at the Spring MVC layer, code that relies on lower-level servlet container behavior cannot be directly tested with MockMvc.
197197
198-
For example, Spring Boot's error handling is based on the "`error page`" support provided by the Servlet container.
198+
For example, Spring Boot's error handling is based on the "`error page`" support provided by the servlet container.
199199
This means that, whilst you can test your MVC layer throws and handles exceptions as expected, you cannot directly test that a specific <<web#web.servlet.spring-mvc.error-handling.error-pages, custom error page>> is rendered.
200200
If you need to test these lower-level concerns, you can start a fully running server as described in the next section.
201201
====
@@ -708,7 +708,7 @@ It can also be used to configure the host, scheme, and port that appears in any
708708

709709
[[features.testing.spring-boot-applications.autoconfigured-spring-restdocs.with-mock-mvc]]
710710
===== Auto-configured Spring REST Docs Tests with Mock MVC
711-
`@AutoConfigureRestDocs` customizes the `MockMvc` bean to use Spring REST Docs when testing Servlet-based web applications.
711+
`@AutoConfigureRestDocs` customizes the `MockMvc` bean to use Spring REST Docs when testing servlet-based web applications.
712712
You can inject it by using `@Autowired` and use it in your tests as you normally would when using Mock MVC and Spring REST Docs, as shown in the following example:
713713

714714
[source,java,indent=0,subs="verbatim"]

spring-boot-project/spring-boot-docs/src/docs/asciidoc/getting-started/system-requirements.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ Spring Boot supports the following embedded servlet containers:
3737
| 4.0
3838
|===
3939

40-
You can also deploy Spring Boot applications to any Servlet 3.1+ compatible container.
40+
You can also deploy Spring Boot applications to any servlet 3.1+ compatible container.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/jersey.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ include::{docs-java}/howto/jersey/springsecurity/JerseySetStatusOverSendErrorCon
2121
[[howto.jersey.alongside-another-web-framework]]
2222
=== Use Jersey Alongside Another Web Framework
2323
To use Jersey alongside another web framework, such as Spring MVC, it should be configured so that it will allow the other framework to handle requests that it cannot handle.
24-
First, configure Jersey to use a Filter rather than a Servlet by configuring the configprop:spring.jersey.type[] application property with a value of `filter`.
24+
First, configure Jersey to use a filter rather than a servlet by configuring the configprop:spring.jersey.type[] application property with a value of `filter`.
2525
Second, configure your `ResourceConfig` to forward requests that would have resulted in a 404, as shown in the following example.
2626

2727
[source,java,indent=0,subs="verbatim"]

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/spring-mvc.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ See the {spring-boot-autoconfigure-module-code}/web/servlet/WebMvcAutoConfigurat
141141

142142
[[howto.spring-mvc.multipart-file-uploads]]
143143
=== Handling Multipart File Uploads
144-
Spring Boot embraces the Servlet 3 `javax.servlet.http.Part` API to support uploading files.
144+
Spring Boot embraces the servlet 3 `javax.servlet.http.Part` API to support uploading files.
145145
By default, Spring Boot configures Spring MVC with a maximum size of 1MB per file and a maximum of 10MB of file data in a single request.
146146
You may override these values, the location to which intermediate data is stored (for example, to the `/tmp` directory), and the threshold past which data is flushed to disk by using the properties exposed in the `MultipartProperties` class.
147147
For example, if you want to specify that files be unlimited, set the configprop:spring.servlet.multipart.max-file-size[] property to `-1`.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/traditional-deployment.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ This section answers common questions about traditional deployment.
88
[[howto.traditional-deployment.war]]
99
=== Create a Deployable War File
1010

11-
WARNING: Because Spring WebFlux does not strictly depend on the Servlet API and applications are deployed by default on an embedded Reactor Netty server, War deployment is not supported for WebFlux applications.
11+
WARNING: Because Spring WebFlux does not strictly depend on the servlet API and applications are deployed by default on an embedded Reactor Netty server, War deployment is not supported for WebFlux applications.
1212

1313
The first step in producing a deployable war file is to provide a `SpringBootServletInitializer` subclass and override its `configure` method.
14-
Doing so makes use of Spring Framework's Servlet 3.0 support and lets you configure your application when it is launched by the servlet container.
14+
Doing so makes use of Spring Framework's servlet 3.0 support and lets you configure your application when it is launched by the servlet container.
1515
Typically, you should update your application's main class to extend `SpringBootServletInitializer`, as shown in the following example:
1616

1717
[source,java,indent=0,subs="verbatim"]

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/webserver.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ The following Maven example shows how to exclude Tomcat and include Jetty for Sp
4141
</dependency>
4242
----
4343

44-
NOTE: The version of the Servlet API has been overridden as, unlike Tomcat 9 and Undertow 2, Jetty 9.4 does not support Servlet 4.0.
45-
If you wish to use Jetty 10, which does support Servlet 4.0, override the `jetty.version` property rather than the `servlet-api.version` property.
44+
NOTE: The version of the servlet API has been overridden as, unlike Tomcat 9 and Undertow 2, Jetty 9.4 does not support servlet 4.0.
45+
If you wish to use Jetty 10, which does support servlet 4.0, override the `jetty.version` property rather than the `servlet-api.version` property.
4646

4747
The following Gradle example configures the necessary dependencies and a {gradle-docs}/resolution_rules.html#sec:module_replacement[module replacement] to use Undertow in place of Reactor Netty for Spring WebFlux:
4848

@@ -239,9 +239,9 @@ See the list of <<application-properties#application-properties>>.
239239

240240
The previous sections covered already many common use cases, such as compression, SSL or HTTP/2.
241241
However, if a configuration key doesn't exist for your use case, you should then look at {spring-boot-module-api}/web/server/WebServerFactoryCustomizer.html[`WebServerFactoryCustomizer`].
242-
You can declare such a component and get access to the server factory relevant to your choice: you should select the variant for the chosen Server (Tomcat, Jetty, Reactor Netty, Undertow) and the chosen web stack (Servlet or Reactive).
242+
You can declare such a component and get access to the server factory relevant to your choice: you should select the variant for the chosen Server (Tomcat, Jetty, Reactor Netty, Undertow) and the chosen web stack (servlet or reactive).
243243

244-
The example below is for Tomcat with the `spring-boot-starter-web` (Servlet stack):
244+
The example below is for Tomcat with the `spring-boot-starter-web` (servlet stack):
245245

246246
[source,java,indent=0,subs="verbatim"]
247247
----
@@ -293,21 +293,21 @@ In a servlet stack application, i.e. with the `spring-boot-starter-web`, there a
293293

294294
[[howto.webserver.add-servlet-filter-listener.spring-bean]]
295295
==== Add a Servlet, Filter, or Listener by Using a Spring Bean
296-
To add a `Servlet`, `Filter`, or Servlet `*Listener` by using a Spring bean, you must provide a `@Bean` definition for it.
296+
To add a `Servlet`, `Filter`, or servlet `*Listener` by using a Spring bean, you must provide a `@Bean` definition for it.
297297
Doing so can be very useful when you want to inject configuration or dependencies.
298298
However, you must be very careful that they do not cause eager initialization of too many other beans, because they have to be installed in the container very early in the application lifecycle.
299299
(For example, it is not a good idea to have them depend on your `DataSource` or JPA configuration.)
300300
You can work around such restrictions by initializing the beans lazily when first used instead of on initialization.
301301

302-
In the case of `Filters` and `Servlets`, you can also add mappings and init parameters by adding a `FilterRegistrationBean` or a `ServletRegistrationBean` instead of or in addition to the underlying component.
302+
In the case of filters and servlets, you can also add mappings and init parameters by adding a `FilterRegistrationBean` or a `ServletRegistrationBean` instead of or in addition to the underlying component.
303303

304304
[NOTE]
305305
====
306306
If no `dispatcherType` is specified on a filter registration, `REQUEST` is used.
307-
This aligns with the Servlet Specification's default dispatcher type.
307+
This aligns with the servlet specification's default dispatcher type.
308308
====
309309

310-
Like any other Spring bean, you can define the order of Servlet filter beans; please make sure to check the "`<<web#web.servlet.embedded-container.servlets-filters-listeners.beans>>`" section.
310+
Like any other Spring bean, you can define the order of servlet filter beans; please make sure to check the "`<<web#web.servlet.embedded-container.servlets-filters-listeners.beans>>`" section.
311311

312312

313313

@@ -393,7 +393,7 @@ If the proxy adds the commonly used `X-Forwarded-For` and `X-Forwarded-Proto` he
393393
With this option, the Web servers themselves natively support this feature; you can check their specific documentation to learn about specific behavior.
394394

395395
If this is not enough, Spring Framework provides a {spring-framework-docs}/web.html#filters-forwarded-headers[ForwardedHeaderFilter].
396-
You can register it as a Servlet Filter in your application by setting `server.forward-headers-strategy` is set to `FRAMEWORK`.
396+
You can register it as a servlet filter in your application by setting `server.forward-headers-strategy` is set to `FRAMEWORK`.
397397

398398
TIP: If you are using Tomcat and terminating SSL at the proxy, configprop:server.tomcat.redirect-context-root[] should be set to `false`.
399399
This allows the `X-Forwarded-Proto` header to be honored before any redirects are performed.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/graceful-shutdown.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[[web.graceful-shutdown]]
22
== Graceful Shutdown
3-
Graceful shutdown is supported with all four embedded web servers (Jetty, Reactor Netty, Tomcat, and Undertow) and with both reactive and Servlet-based web applications.
3+
Graceful shutdown is supported with all four embedded web servers (Jetty, Reactor Netty, Tomcat, and Undertow) and with both reactive and servlet-based web applications.
44
It occurs as part of closing the application context and is performed in the earliest phase of stopping `SmartLifecycle` beans.
55
This stop processing uses a timeout which provides a grace period during which existing requests will be allowed to complete but no new requests will be permitted.
66
The exact way in which new requests are not permitted varies depending on the web server that is being used.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Spring Boot simplifies development of reactive web applications by providing aut
55
[[web.reactive.webflux]]
66
=== The "`Spring WebFlux Framework`"
77
Spring WebFlux is the new reactive web framework introduced in Spring Framework 5.0.
8-
Unlike Spring MVC, it does not require the Servlet API, is fully asynchronous and non-blocking, and implements the https://www.reactive-streams.org/[Reactive Streams] specification through https://projectreactor.io/[the Reactor project].
8+
Unlike Spring MVC, it does not require the servlet API, is fully asynchronous and non-blocking, and implements the https://www.reactive-streams.org/[Reactive Streams] specification through https://projectreactor.io/[the Reactor project].
99

1010
Spring WebFlux comes in two flavors: functional and annotation-based.
1111
The annotation-based one is quite close to the Spring MVC model, as shown in the following example:
@@ -120,7 +120,7 @@ So, if there is an `index.html` in any of your locations on startup, it is the h
120120
In addition to the "`standard`" static resource locations listed earlier, a special case is made for https://www.webjars.org/[Webjars content].
121121
Any resources with a path in `+/webjars/**+` are served from jar files if they are packaged in the Webjars format.
122122

123-
TIP: Spring WebFlux applications do not strictly depend on the Servlet API, so they cannot be deployed as war files and do not use the `src/main/webapp` directory.
123+
TIP: Spring WebFlux applications do not strictly depend on the servlet API, so they cannot be deployed as war files and do not use the `src/main/webapp` directory.
124124

125125

126126

0 commit comments

Comments
 (0)