tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Echerer <>
Subject Re: Classloading questions
Date Mon, 01 May 2006 12:31:51 GMT
Christopher Piggott wrote:
> As an experiment, I placed a file in the webapp dir of a servlet (not in
> WEB-INF but in the directory above it) and attempted to read it using
> getResource().  What I found was that I could not locate the resource unless
> I used getServletContext().getResource().

Your basic assumption that getServletContext().getResource() works by
using classloader means is simply wrong.

If you look at the JavaDoc of ServletContext it says that getResource()
works file based (relative to the context root) and does not use the


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message