I have given my welcome file in web.xml
But when running the application, it is showing 404 error on http://172.16.2.16:8080/sampletest/
It is a spring
At the startup by default all incoming requests are mapping to '/' pattern as you write in the web.xml:
dispatcher
/
update:
Try to map a Controller method for the default view:
@RequestMapping(value = "/", method = GET)
public String welcome() {
return "index";
}
Add viewresolver to dispather-servlet.xml:
Remove welcome file from the web.xml as automatically spring will search for index page by default:
index.jsp