Relative Content

Tag Archive for springspring-mvchttp-status-code-404

Webapp with spring MVC with jsp as front end. Index.jsp as my landing page inside WEB-INF/jsp/index.jsp.My Controller isn’t being invoked

Okay,I am using spring MVC,jsp,Java Based Configuration. where index.jsp is my landing page which is inside WEB-INF/jsp/index.jsp. I am aware that jsp files inside WEB-INF cannot be accessed directly through URL.So, i have set my Controller with @GetMapping(“/”) that return string “index” which is then handled by InternalResourceViewResolver, prefix as”/WEB-INF/jsp/” and suffix as”.jsp”.
When i run my app, “http://localhost:14639/project/” this is my URL and i get 404 not found,
“The requested resource [/project/] is not available”. I have “Sysout” statement inside the controller with @GetMapping(“/”) mapping, it isn’t being invoked and also there is not any logs on console rather than tomcat starting.
and context path is “project”.