Where am I (in my apache server)???
807569Aug 24 2006 — edited Aug 24 2006Hi ppl.
I've taken over a web-portal (and I'm not very good at java and apache so far. working on it though) and I'm having a problem knowing where in the file-structure I am.
I've made functions that reads a file, but I don't know how to find it without using an 'absolute path' starting from C:\.
But I want to be able to place this file somewhere (in the WEB_INF-directory preferable) so I can find it wherever I place
this directory at my harddrive.
I've tried to get the current working path with :
String strPath = new File(".").getAbsolutePath();
but all I get is "C:\Winnt\system32\"
Anyone knows how to get the path to either this class-file (or jar-file that it is placed in) or to root of the portal???
Thanx in advance
/Arv