Fabio Cepeda

Posts Tagged ‘application context

Spring 2.5 – Loading files from service classes.

Posted by: fcepeda on: November 6, 2008

Aware of the application context in the service layer.
Last night, I spent a few hours understanding how to load a file from a class in the service layer of my webapp that did not have access to the application context. I started using DefaultResourceLoader class to load the file with:
DefaultResourceLoader loader = new DefaultResourceLoader();
File file [...]