We would like to add a thank you page for registration in the newsletter. So let’s start by adding another state – view state and taking care of proper redirection.

I’m going to edit the newsletter-flow.xml file and make some modifications:

The status of the “print user” action does not forward the flow to the added state that simply redirects to the start page, only to the new “thank you” state which is the view state to display the thank you. Only this new state will transfer the flow to the start page when the event “finish”.we see that the viewer is responsible for the viewer’s share.jsp file.

There is nothing extraordinary here, it’s just a thank you page. It is worth looking at lines 16 and 17, and line 19. On lines 16 and 17 we see a reference to the object of the victim – or rather to its fields. Note that this is an object that we complete in this flow.  Without this declaration, we will not have access to this data! Line 19 is called by the link action “stop” which causes the flow to be “added”.

There is a possibility that someone in the form will enter the Polish letters. Although this is not just a Spring element, it is worth adding the following entry to your web.xml file so that the Polish characters entered do not change into bushes.