I have put all of my JSP inside WEB-INF directory, so that no one can access the jsp directly. Normally, all of the view should be called by controller.
Say, I have mapped a request /home.html to HomeController and then it would dispatch to the view name home which is located at /WEB-INF/jsp/home.jsp (by using prefix-suffix mapping as viewResolver)
The problem is that I want to redirect the request by sending redirect to browser, so I use
But in the browser's address bar, I see something like:
return new ModelAndView(new RedirectView("/home.html"))
And actually I want it to redirect to http://serverName/appName/home.html
How can I do that?