From 046724b9400918d710459b4dc566e98cff2d2644 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Thu, 5 Sep 2024 16:02:42 +0200 Subject: [PATCH] Document that WebFlux does not support forward redirects Closes gh-33441 --- .../modules/ROOT/pages/web/webflux/dispatcher-handler.adoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/framework-docs/modules/ROOT/pages/web/webflux/dispatcher-handler.adoc b/framework-docs/modules/ROOT/pages/web/webflux/dispatcher-handler.adoc index a621320538..50f7420205 100644 --- a/framework-docs/modules/ROOT/pages/web/webflux/dispatcher-handler.adoc +++ b/framework-docs/modules/ROOT/pages/web/webflux/dispatcher-handler.adoc @@ -184,9 +184,11 @@ xref:web/webflux/reactive-spring.adoc#webflux-exception-handler[Exceptions] in t View resolution enables rendering to a browser with an HTML template and a model without tying you to a specific view technology. In Spring WebFlux, view resolution is supported through a dedicated xref:web/webflux/dispatcher-handler.adoc#webflux-resulthandling[HandlerResultHandler] that uses - `ViewResolver` instances to map a String (representing a logical view name) to a `View` +`ViewResolver` instances to map a String (representing a logical view name) to a `View` instance. The `View` is then used to render the response. +Web applications need to use a xref:web/webflux-view.adoc[View rendering library] to support this use case. + [[webflux-viewresolution-handling]] === Handling @@ -238,6 +240,9 @@ operate in terms of logical view names. A view name such as `redirect:/some/resource` is relative to the current application, while a view name such as `redirect:https://example.com/arbitrary/path` redirects to an absolute URL. +NOTE: xref:web/webmvc/mvc-servlet/viewresolver.adoc#mvc-redirecting-forward-prefix[Unlike the Servlet stack], +Spring WebFlux does not support "FORWARD" dispatches, so `forward:` prefixes are not supported as a result. + [[webflux-multiple-representations]] === Content Negotiation