O.K. Thanks. When I deploy application to local Tomcat from my Eclipse environment it don't use WAR, but if I want to run my app on server's Tomcat I'll need to have application in war, isn't it ?
-- M. newton.dave wrote: > > --- On Thu, 12/11/08, Milan Milanovic wrote: >> If I try to say e.g.: >> PropertiesConfiguration config = new >> PropertiesConfiguration("/WEB-INF/users.properties"); > > You're assuming path names are magically converted into web-app-relative > paths inside a web application; this isn't the case. > > Nor is this a classpath issue if you're trying to get files from the > filesystem. If you *are* trying to access resources from the classpath > then the resources would need to be on the classpath, which is > /WEB-INF/classes (by default, anyway). > > If you are accessing *filesystem* resources then you need to convert > web-app-relative paths like "/WEB-INF/users.properties" into an actual > path. Things like ServletContext.getRealPath(...) are good for that. > > Unless you're deploying an un-exploded WAR file, in which case it will > fail, which is why people like getting things from the classpath. > > Dave > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/-S2--Locating-a-file-or-resource-in-Web-application-%28classpath-issue%29-tp20959786p20962267.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org