You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But both don't work. The first uses the system classloader, instead of the servlet classloader (which makes sense), but the second variant should work. In the code I see that the class that is passed in is used like this:
relativeToClass.getResource(resourceName)
For some reason this doesn't work. What does work is
I'm trying to load resources from the classpath in a servlet application. I would expect to be able to use
or maybe
But both don't work. The first uses the system classloader, instead of the servlet classloader (which makes sense), but the second variant should work. In the code I see that the class that is passed in is used like this:
For some reason this doesn't work. What does work is
Since I cannot passin the
URL
returned from this call, I have to resort toWhich isn't very elegant. Am I missing something here?
The text was updated successfully, but these errors were encountered: