In Springboot 2.7 I have a simple controller that dinamically sets up a page using a static resource:
@RequestMapping(value = "/controller-first", method = RequestMethod.GET)
public ModelAndView controller-first( Locale locale,
HttpServletRequest request,
HttpServletResponse response,
Model model)
{
dinamically manipulate model here...
return new ModelAndView("static_resource_here");
}
With this controller I have a form and submit that calls the second controller. The second controller should keep the ModelAndView from the first controller, modify the ModelAndView and send it to the user. Which is the best solution to implement such controller?