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.
in my app-context.xml
I need a file in WEB-INF to initialize some data in the class.
<bean id="test" class="testClass" init-method="init"/>
I've tried doing a
InputStream in = new FileInputStream( "/WEB-INF/my.xml" );
but from my class, i get a null pointer. Any ideas?