I am studying spring MVC based webapps. So I created a project in spring mvc and I have chosen eclipse IDE.Apache tomcat 8 server and jre1.8 the version of spring package is 4.2
Since you mentioned modules folder in the prefix of viewResolver it is working like that..
/modules/
.jsp
Which means return "branch/branchInsert"
will find jsp in /modules/branch/branchInsert.jsp
.
If you use just string to return means it's just an path from the jsp where you are sending the requset.So for that viewResolver
wont add prefix folder.
But if you use ModelAndView
the viewResolver will add the prefix and suffix.