liveBook · Manning

Redirect view

As explained in Spring in Action, Sixth Edition

A redirect view is a controller response instruction that causes the client's browser to request another path.

A redirect view tells the browser to request another path after a controller method finishes. In Spring MVC, return a view name prefixed with "redirect:". section 2.2

Redirect after creating a taco

After processing a taco, return "redirect:/orders/current". The browser then requests the order form at that relative path instead of rendering the current response directly. section 2.2

How Spring in Action, Sixth Edition covers it

How deep it goes
Defines the redirect: prefix and relative-path behavior, while deferring persistence logic to a later stage.
Examples
Uses /orders/current after taco creation and / after order submission.
What it assumes
Assumes controller mappings and logical view names, then applies them to a form-submission flow.
What you can do after
Apply it via Spring MVC by returning redirect:/path after processing a request.
How it connects
Connects controller methods, POST request handling, relative paths, and order forms.

This explainer was generated by Manning's knowledge graph from the text of Spring in Action, Sixth Edition. The section links point to the parts of the book it draws on.