user.dir is incorrect while using tomcat web app in eclipse

I have a configuration project that few projects are using it.
All of my project under the same workingspace.





mongoDB and the model project are using the configuration jar project and able to read the xml files using relative path ../configuration/conf/….xml

when using the

 System.out.println("Working Directory = " +

inside both of them, I’m getting the correct path (workspace)

while trying to do it from the web app servlet i’m getting the folder of eclipse.exe that causing some problems.

How can i fix the user.dir defalte path for the web app?

Source: eclipse

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.