From a programmer’s point of view, this means that
return new ModelAndView("redirect:surveys.hmtl"); when you use redirection, you redirect your controller to another one that is applicable to the redirected URL. Simply put, you can have a controller that processes this path. And this controller will be launched. And it can redirect to another page. And then in the HTTP response you can see the redirected status 3xx is not 200, as in the usual case.
return new ModelAndView("surveys.html");
If you are not using redirection, you only call the View part and display your html. In the response state, HTTP 200 / OK is.
source share