diff --git a/gradle/docs-dokka.gradle b/gradle/docs-dokka.gradle index dfe137d9cf..147c39497f 100644 --- a/gradle/docs-dokka.gradle +++ b/gradle/docs-dokka.gradle @@ -20,7 +20,7 @@ tasks.findByName("dokkaHtmlPartial")?.configure { url.set(new URL("https://javadoc.io/doc/org.hamcrest/hamcrest/2.1/")) } externalDocumentationLink { - url.set(new URL("https://javadoc.io/doc/javax.servlet/javax.servlet-api/latest/")) + url.set(new URL("https://javadoc.io/doc/jakarta.servlet/jakarta.servlet-api/latest/")) } externalDocumentationLink { url.set(new URL("https://javadoc.io/static/io.rsocket/rsocket-core/1.1.1/")) diff --git a/src/docs/asciidoc/languages/dynamic-languages.adoc b/src/docs/asciidoc/languages/dynamic-languages.adoc index ce35eb55e0..7362adaa7e 100644 --- a/src/docs/asciidoc/languages/dynamic-languages.adoc +++ b/src/docs/asciidoc/languages/dynamic-languages.adoc @@ -686,8 +686,8 @@ by using the Groovy dynamic language: import org.springframework.web.servlet.ModelAndView import org.springframework.web.servlet.mvc.Controller - import javax.servlet.http.HttpServletRequest - import javax.servlet.http.HttpServletResponse + import jakarta.servlet.http.HttpServletRequest + import jakarta.servlet.http.HttpServletResponse class FortuneController implements Controller { diff --git a/src/docs/asciidoc/web/webmvc.adoc b/src/docs/asciidoc/web/webmvc.adoc index 33b49bef56..805a2f853c 100644 --- a/src/docs/asciidoc/web/webmvc.adoc +++ b/src/docs/asciidoc/web/webmvc.adoc @@ -736,8 +736,8 @@ or to render a JSON response, as the following example shows: @RequestMapping(path = "/error") public Map handle(HttpServletRequest request) { Map map = new HashMap(); - map.put("status", request.getAttribute("javax.servlet.error.status_code")); - map.put("reason", request.getAttribute("javax.servlet.error.message")); + map.put("status", request.getAttribute("jakarta.servlet.error.status_code")); + map.put("reason", request.getAttribute("jakarta.servlet.error.message")); return map; } } @@ -751,8 +751,8 @@ or to render a JSON response, as the following example shows: @RequestMapping(path = ["/error"]) fun handle(request: HttpServletRequest): Map { val map = HashMap() - map["status"] = request.getAttribute("javax.servlet.error.status_code") - map["reason"] = request.getAttribute("javax.servlet.error.message") + map["status"] = request.getAttribute("jakarta.servlet.error.status_code") + map["reason"] = request.getAttribute("jakarta.servlet.error.message") return map } } @@ -1932,7 +1932,7 @@ instead. `@GetMapping` (and `@RequestMapping(method=HttpMethod.GET)`) support HTTP HEAD transparently for request mapping. Controller methods do not need to change. -A response wrapper, applied in `javax.servlet.http.HttpServlet`, ensures a `Content-Length` +A response wrapper, applied in `jakarta.servlet.http.HttpServlet`, ensures a `Content-Length` header is set to the number of bytes written (without actually writing to the response). `@GetMapping` (and `@RequestMapping(method=HttpMethod.GET)`) are implicitly mapped to @@ -2053,17 +2053,17 @@ and others) and is equivalent to `required=false`. | Generic access to request parameters and request and session attributes, without direct use of the Servlet API. -| `javax.servlet.ServletRequest`, `javax.servlet.ServletResponse` +| `jakarta.servlet.ServletRequest`, `jakarta.servlet.ServletResponse` | Choose any specific request or response type -- for example, `ServletRequest`, `HttpServletRequest`, or Spring's `MultipartRequest`, `MultipartHttpServletRequest`. -| `javax.servlet.http.HttpSession` +| `jakarta.servlet.http.HttpSession` | Enforces the presence of a session. As a consequence, such an argument is never `null`. Note that session access is not thread-safe. Consider setting the `RequestMappingHandlerAdapter` instance's `synchronizeOnSession` flag to `true` if multiple requests are allowed to concurrently access a session. -| `javax.servlet.http.PushBuilder` +| `jakarta.servlet.http.PushBuilder` | Servlet 4.0 push builder API for programmatic HTTP/2 resource pushes. Note that, per the Servlet specification, the injected `PushBuilder` instance can be null if the client does not support that HTTP/2 feature. @@ -2927,7 +2927,7 @@ as the following example shows: For use cases that require adding or removing session attributes, consider injecting `org.springframework.web.context.request.WebRequest` or -`javax.servlet.http.HttpSession` into the controller method. +`jakarta.servlet.http.HttpSession` into the controller method. For temporary storage of model attributes in the session as part of a controller workflow, consider using `@SessionAttributes` as described in @@ -3116,7 +3116,7 @@ When the `@RequestParam` annotation is declared as a `Map `MultiValueMap`, without a parameter name specified in the annotation, then the map is populated with the multipart files for each given parameter name. -NOTE: With Servlet 3.0 multipart parsing, you may also declare `javax.servlet.http.Part` +NOTE: With Servlet 3.0 multipart parsing, you may also declare `jakarta.servlet.http.Part` instead of Spring's `MultipartFile`, as a method argument or collection value type. You can also use multipart content as part of data binding to a @@ -3891,11 +3891,11 @@ level, <> mechanism. | Generic access to request parameters and request and session attributes without direct use of the Servlet API. -| `javax.servlet.ServletRequest`, `javax.servlet.ServletResponse` +| `jakarta.servlet.ServletRequest`, `jakarta.servlet.ServletResponse` | Choose any specific request or response type (for example, `ServletRequest` or `HttpServletRequest` or Spring's `MultipartRequest` or `MultipartHttpServletRequest`). -| `javax.servlet.http.HttpSession` +| `jakarta.servlet.http.HttpSession` | Enforces the presence of a session. As a consequence, such an argument is never `null`. + Note that session access is not thread-safe. Consider setting the `RequestMappingHandlerAdapter` instance's `synchronizeOnSession` flag to `true` if multiple @@ -4768,7 +4768,7 @@ The MVC configuration also exposes several options for asynchronous requests. Filter and Servlet declarations have an `asyncSupported` flag that needs to be set to `true` to enable asynchronous request processing. In addition, Filter mappings should be -declared to handle the `ASYNC` `javax.servlet.DispatchType`. +declared to handle the `ASYNC` `jakarta.servlet.DispatchType`. In Java configuration, when you use `AbstractAnnotationConfigDispatcherServletInitializer` to initialize the Servlet container, this is done automatically. @@ -6097,5 +6097,5 @@ For more details, see the https://github.com/spring-projects/spring-framework/wiki/HTTP-2-support[HTTP/2 wiki page]. The Servlet API does expose one construct related to HTTP/2. You can use the -`javax.servlet.http.PushBuilder` to proactively push resources to clients, and it +`jakarta.servlet.http.PushBuilder` to proactively push resources to clients, and it is supported as a <> to `@RequestMapping` methods.