Flash Attributes

Explore the concept of flash attributes stored temporarily before a redirect and removed after they’ve been used.

The need for flash attributes

The delete works nicely, but the usability could be improved. The modal just closes without any indication that the user was actually removed. It would be a lot better to show a message after the redirect to the list of users. Something like “User Francine Connely was deleted.”

What are flash attributes?

Spring MVC has the concept of flash attributes. These attributes can be added in the controller’s POST and will be made ...