here is the url-pattern in web.xml
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
Here is my controller
@Controller
public class HelloController
{
@RequestMapping("/*.km")
public String handleKm()
{
System.out.println("km ext called");
return "aaa";
}
@RequestMapping("/*.jsp")
public String handleJsp()
{
System.out.println("jsp pages called");
return "bbb";
}
}
while accessing the url with /requestMapping/a.km , it is works, calls the handleKm() method.but with /requestMapping/a.jsp , it should call handleJsp().but it does not work. result : HTTP Status 404 - /requestMapping/a.jsp. why ??
If I chane the url-pattern from "/" to "/*" , although both method are called , but dont get to the appropriate pages. May be the "org.springframework.web.servlet.view.InternalResourceViewResolver" is not working .