Is there a way to do this without the ServletContext?
Normally, if I had the
servlet context, i would do a ServletContext.getResourceasStream() etc, but I'm using Spring2.5, and I have a class that I would like to have initialized automatically, but can't figure out a way to pass in the ServletContext.
ie,
in my app-context.xml
I need a file to initialize some data in the class.
I've tried doing a
InputStream in = new FileInputStream( "/WEB-INF/my.xml" );
but from my class, i get a null pointer. Any ideas?
thanks