Try ServletContext.getRealPath().  You should be able to get the
ServletContext object from the RunData instance.

ServletContext.getRealPath("Resources/tmp/your.xml")

would return (I think as a java.net.url):

/TOMCAT_HOME/webapps/myapp/Resources/tmp/your.xml

I use this all the time to get conf information from the WEB-INF directory
(IMOHO, I feel it is better to stick configuration info in WEB-INF because
it is secured from browsing by default).

Scott

-----Original Message-----
From: Pugh, Eric [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, November 14, 2001 3:38 PM
To: 'Turbine Users List'
Subject: How do I get the absolute file to something in the Resources
dire ctory?


Hi all,

I want to store some configuration information and temp data about my
application in some XML files..  I was going to put them in
\webapps\myapp\Resources\tmp\*.xml

However, I can't figure out how, from inside turbine, to get that path?  I
thought I could use the contentURI object to tell me, but it gives me a
website relative url, not a filesystem url..  

The reason I don't want to use the TurbineResourcesService to store my data
is that some of it is application specific data, and some may be very
changable.

Any ideas?

Eric




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

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

Reply via email to