I have a web server which forwards the dynamic requests with .htm to tomcat (connected using mod_jk) and static resources are served from Apache web server. Consider the following spring controller which process login.htm
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST},
value = {"login.htm"})
public ModelAndView showLoginPage(HttpServletRequest request, HttpServletResponse response) throws Exception {
return new ModelAndView("login");
}
Corresponding viewresolver is as follows:
<!bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/" />
<property name="suffix" value=".html" />
</bean>
This is searching for a file login.html within the tomcat context. But the static login.html reside on htdocs folder of apache (under same domain).
Can anybody please tell me how can the view be resolved from web server?