This is an excellent example of why the concept of "filesystem path relative to the application" really has no meaning in a servlet. When a servlet is deployed into a container, there is no guarantee that it resides at a real filesystem location. The servlet container could choose to execute it directly from the .war file without expanding it, or it could be reading the application code from a URL that is not backed by a traditional file system at all.
In your case, the long path you got back is exactly where Eclipse deployed your application. That path was 100% correct in that context, because if you look at the filesystem at that location you'll find a copy of your application, but obviously not what you were expecting.
In general, it is not possible to portably refer to any file path relative to your application because the path may not exist.