I did post it there and I got a solution.
If anyone is interested, it can be found here:
http://markmail.org/search/?q=list%3Aorg.apache.tomcat.user/#query:list%3Aor
g.apache.tomcat.user%2F+page:1+mid:fbpkjgjtwhtwq4co+state:results
/Ludwig

-----Original Message-----
From: Mark Thomas [mailto:[email protected]] 
Sent: den 23 november 2009 17:42
To: Commons Users List
Subject: Re: [IO] Problem finding right filepath

Ludwig Magnusson wrote:
> Hello!
> 
> We are a team developing a webapp running on a tomcat server. We need to
> list the files in a certain directory in our application, but we cannot
find
> a way to always get the correct path on the different platforms and
> environments. Is this solvable through some IO-function or do we need to
> specify the path to our project in each environment?

This is probably better suited to the Tomcat users list.

That said, as a general rule it is not safe to assume that your web
application is deployed on a file system. Your app could be packaged as
a WAR file sitting on a database.

That said, there are some Servlet API calls that can tell you if you or
on a file system and if you are, where you are on the file system.

Follow up on the Tomcat users list if you need more info.

Mark




---------------------------------------------------------------------
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