commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nodje <nodje...@gmail.com>
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: http://www.nabble.com/-commons-vfs--accessing-exploded-WAR-content-at-runtime-tp25971229p25971229.html
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message