<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/WEB-INF/jsps/" p:suffix=".jsp">
</bean>
@RequestMapping("/Locations/edit/{locationId}")
public String edit(@PathVariable String locationId,ModelMap map) {
Locations location=new Locations();
location=locationsService.getByID(Integer.parseInt(locationId));
map.put("location", location);
reutrn "nameOfYourJspFileHere";
}
EDIT I just figured that your jsp name is not 1 and it is id, so when you send /Locations/edit/1
Note that all of your jsps should reside in /WEB-INF/ (but i suggest add some other folder (jsps,views or something that indicates that jsp files are there) dir, so when you return view name it will append prefix and suffix. So jsps folder can have subfolders, so every time you return view name make sure it is in correct path.
e.g. view name = index.jsp(/WEB-INF/jsps/common/index.jsp) so in your method you would return "common/index"
Hope it helps.