Getting the Class Not Found Exception for DispatcherServlet while rendering index.jsp which is in WEB-CONTENT/WEB-INF/jsp/index.jsp
Following are how the project is stru
From the documentation:
Upon initialization of a DispatcherServlet, Spring MVC looks for a file named [servlet-name]-servlet.xml in the WEB-INF directory of your web application and creates the beans defined there, overriding the definitions of any beans defined with the same name in the global scope.
So placing abc-servlet.xml
within WEB-INF
should allow the dispatcher servlet to pick up your configuration.
If you didn't want your dispatcher servlet to use the default name or wanted it to reside in another directory besides WEB-INF
you would specify this configuration in web.xml. The location and name of the dispatcher servlets configuration can be changed by setting the contextConfigLocation
init-param within the DispatcherServlet
dispatcher
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
WEB-INF/spring/servlet-context.xml
1
dispatcher
/
This information can be found within the Spring Documentation