I have created a Maven Dynamic Web Project using Eclipse. I have created a webservice, the webservice calls a method from another class. Inside the class, i try to create a local folder in the folder of the project.
So far i have tried:
String path = new java.io.File("").getAbsolutePath();
String path = new File(".").getCanonicalPath();
String path = System.getProperty("user.dir");
String path = System.getProperty("catalina.base")
The first three returns the following path:
\eclipse\jee-mars\eclipse
The fourth statement returns the path:
\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp4
Simply, the path that i want is:
\workspace\MyProject