I have foo.war running in Tomcat via Eclipse. I am using Spring Mvc. When I attempt to view the index page for this context:
I get: HTTP Status 404 - /foo/WEB-INF/pages/index.jsp
My Maven project has a src/main/webapp/WEB-INF/jsp/pages/index.jsp.
For some reason, this has to be in the .war maven module; it cannot be in a separate jar module included in the war as a dependency in maven. Which is strange, as Tomcat is picking up my servlet config in this separate maven module.
The view in Spring Mvc is configured in the following way:
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/pages/");
resolver.setSuffix(".jsp");
resolver.setViewClass(JstlView.class);
My controller is like this:
@RequestMapping("/")
public String index(Map<String, Object> model) throws Exception {
return "index";
}
The servlet mapping is currently "/".
How can I put the jsp in a separate module?
EDIT: Rewritten because a separate problem confused matters
EDIT: Changed some more. Looks like Maven multi-module build is involved...