"Ben_" <> wrote in message news:<3f15b5b8$0$6531$ synet.net>...
> What about this.getClass().getClassLoader().getResourceAsStre am() ? If the
> class is used loaded by a servlet, your class will WEB-INF/classes in its
> classpath. In fact, your class will have the same classpath as the
> classloader that loaded you.
>
> Alternatively, you can add a setClassLoader(ClassLoader cl) method on your
> generic class and use the classloader the client tells you to use.
Tried that, thanks though. The problem in this case is that only
WEB-INF/classes is in the classpath - I need to access WEB-INF/somedir
.. Any class-based solution can't access a non-classes dir under
WEB-INF, I'm thinking.
iksrazal
|