--- 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to