commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ludwig Magnusson" <>
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:

-----Original Message-----
From: Mark Thomas [] 
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
> 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.


To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message