commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ludwig Magnusson" <lud...@itcatapult.com>
Subject RE: [IO] Problem finding right filepath
Date Mon, 23 Nov 2009 18:44:35 GMT
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:markt@apache.org] 
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: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message