Can anyone explain getResource()?
640063Jun 27 2008 — edited Jun 27 2008I can't find this info in any documentation I read. I have a servlet on tomcat under tomcat-home/webapps/ROOT/WEB-INF/classes/package/Upload.class. When I use (new Object()).getClass().getResource("/filename.ext") to get the url to a file, I always get null. Where am I supposed to put "filename" so it can be found? I've tried, ROOT/, ROOT/WEB-INF/, ROOT/WEB-INF/classes, and ROOT/WEB-INF/classes/package/. I always get null.