I have the following webApp folder structure:
I want to load spring context manually.
I wrote the following code:
ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");
When the code above invokes I see the folowing exception message:
java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist
How to rewrite my code to avoid this exception?
P.S. I don't want to move my xml file.
P.P.S.
new ClassPathXmlApplicationContext("WEB-INF/applicationContext.xml")
doesn't work too although in web.xml was written
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/applicationContext.xml</param-value>
</context-param>
and it works