Reputation: 61
I have following app setup.
*.htm
URL pattern. @RequestMapping(value = "doSuccess")
new ModelAndView("success");
<bean id="jspViewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/WEB-INF/jsp/"
p:suffix=".jsp"
p:order="1"/>
<a href="doSuccess.htm">Click me</a>
success.jsp
located in /WEB-INF/jsp/
Now, when I click on the Click me, I get a 404. I did a bit of debugging and realized that the method in the controller was indeed being called but irrespective of the return statement it is trying to find doSuccess.htm
.
Upvotes: 2
Views: 970
Reputation: 61
I figured the error. I was using Netbeans and i used the auto complete imports. It was importing the org.springframework.web.portlet.ModelAndView instead of servlet.ModelAndView.
Upvotes: 4