commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: [IO] Problem finding right filepath
Date Mon, 23 Nov 2009 16:41:31 GMT
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.


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

View raw message