commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nodje <>
Subject [commons-vfs] accessing exploded WAR content at runtime
Date Tue, 20 Oct 2009 08:05:09 GMT

What'd be a good way to get access to a deployed WAR's content using VFS?

Right now, I'm doing:
servletContext.getRealPath("") + File.separator + "WEB-INF" + File.separator
+ "classes" + File.separator + path;

And this quite inconvenient to rely on servletContext since I don't have
access to it in lower layers, not speaking about the test, which in
isolation don't even run in a ServletContext.

I don't see any other way than using the local file system. But if I do so,
I'll get an absolute path, not a relative to the deployment folder one.

Any idea?
View this message in context:
Sent from the Commons - User mailing list archive at

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

View raw message