Apr 16th, 2008, 09:40 AM
Problem opening applicationContext.xml
i have a class that due to design issue must get reference to the applicationContext.xml file explicitly to use the getBean method, the problem is that the file cant open the file, the .class file is located in the classes folder under WEB-INF... i dunno how to give it a relative path to the file,
but always says file does not exist.....any help??
Apr 16th, 2008, 09:44 AM
One way would be to use WebApplicationUtils to resolve the WebApplicationContext.
A more elegant solution would be for your class to implement BeanFactoryAware. That way the context would be injected into your class, freeing you from the lookup.