Accessing a web application context from "outside"
If a class is outside of a web application context, how should it access resource in the web context. (Besides putting every resource in WEB-INF/classes?????)
The ContextLoader in web.xml is aware of resources directly below WEB-INF. However the resource locator (SingletonBeanFactoryLocator) is looking for resources in the classpath: WEB-INF/classes and WEB-INF/lib. While this is compliant to the Java Servlet Specification, it poses quite a problem: If we use the SingletonBeanFactoryLocator to learn of resources in WEB-INF then all references to resources inside the applicationContext files under WEB-INF must be in the classpath. This can create a conflict with the ContextLoader. So......
How can we get the ClassPathXmlApplicationContext to load resources from WEB-INF, such that other non-web aware classes can access them.