I am using Java EE with Spring framework. I have been setting up a test project (everything is working so far) and I currently have the following line in the controller to simply load up a view called index.jsp
:
return new ModelAndView("index");
This is just a test project so I'm not worried about syntax or anything like that. I am simply wondering what is the best way to load up a certain view from within a controller in Spring? I am sure that hard-coding it like this is not best-practice and am just wondering what the proper way to do this is? Should the name be pulled from some config file?