Why  dont you setup a JNDI variable for your context which will set the
value of base directory ... And then use it in your app... 
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html

We use JNDI ... :o) 


-----Original Message-----
From: Michal Kwiatek [mailto:[EMAIL PROTECTED] 
Sent: 12 April 2005 10:16
To: Tomcat Users List
Subject: Check deployment dir programatically


Hello all,

How can I programatically check the absolute path to the deployment
direcotory (webapps/myApp directory) on the server?

request.getSession().getServletContext().getResourceAsStream(fileName)
works fine to read a file from the direcory, but I see no equivalent to
check the root deployment directory.

Thanks in advance,
Michal.

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

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

Reply via email to