Dear tomcat users,

How do I find the root directory of the application to which a servlet belongs?
I know that the following works:
        getServletContext().getRealPath("")

But the documentation on getRealPath warns me that this is not going to work if
my application is deployed as a war file. 
Is there a way of doing this that would work with war? 
Say I want to access file foo.txt that is in the root directory of my
application. How do I get to this file if the application is deployed as a war
file?

Thanks for any help,

Guillaume Barreau       

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to