I use tomcat server, and try to call a java class from servlet, that class has method which will return system current directory path. It's result is difference with the one when I run form main method in that class.
- from main method: "D:\Projects\Eclipse\Assignment" (which is where i place my project)
- from servlet: "D:\IDE\eclipse helios" ( which is where i place my eclipse)
With this I have trouble to access my xml file in my project folder( file not found exception when I call a class from servlet). I want the same result when call from servlet as when run main method. How can I do that?
I would appreciate any advice you could give me to, or any articles that you could recommend.
Thank you.