How to find the real path of a file I am trying to access a file on my MacBook Pro via a web app running on Tomcat in Eclipse (localhost).  Whenever I try to access the file I receive the following IO Exception:

Exception:  /private/var/appname/app_config.txt (No such file or directory)


This file does exist and when I use Apple+I the file info window gives this location:

/private/var/appname


So why does the web app get the (No such file or directory) exception?  How do I get the real path if the file info window isn't valid via web app?

EDIT

The permissions on the file in questions are:

-rw-r--r--


where the owner is the user context the web app is running under, which is determined by entering the following into the shell:

ps axu -w


Permissions on the directory appname are as such:

drwxr-x---   


where again, the owner is the user context the web app is running under.

And finally, the directory var has permissions:

drwxr-xr-x


with root as owner.



Furthermore, removing private from the path results in the exact same exception, sans the private in the path:

Exception:  /var/appname/app_config.txt (No such file or directory)
What user identity is the Tomcat / Apache application running as? While you can read the file with your account, if the application server is running as a limited rights user or in a chroot'd environment, you'll not be able to see the file. Find out the user account it is running as and try suing to that account then see if you can read the file.