I have a very simple spring test app. But I get exception even though everything seems to be on order. I might be missing something. Please check the pic to see the project structure and web.xml file contains as well as exception:-
efinitionStoreException: IOException parsing XML document from class path resource [WEB-INF/servlet-context.xml]; nested exception is java.io.FileNotFoundException: class path resource [WEB-INF/servlet-context.xml] cannot be opened because it does not exist at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
WEB-INF
is not a classpath resource but a servlet resource... removeclasspath:
prefix or place your XML files insidesrc/main/resources
from where they are copied toWEB-INF/classes
(which is on classpath). – Pavel Horal