I use JBoss 2.4.7 (soon upgrading to 4). My root web application
context is deployed outside of a war file. I want my web application to
be able to write new files into this directory tree. So, I need to
obtain a java.io.File object that points to the root of my web
application. However, this path varies from server to server. Is there
a way I can get this path from the JBoss API somehow?
Tobias Schierge - 15 Apr 2006 15:34 GMT
Hi,
> I use JBoss 2.4.7 (soon upgrading to 4). My root web application
> context is deployed outside of a war file. I want my web application to
> be able to write new files into this directory tree. So, I need to
> obtain a java.io.File object that points to the root of my web
> application. However, this path varies from server to server. Is there
> a way I can get this path from the JBoss API somehow?
try ServletContext's getRealPath method but before rethink your idea and
evaluate if it is really a good one..
Regards,
Tobias