The following code returns the path to the war folder (i.e. /ROOT/):
getServletContext().getRealPath("/");
I need to go one folder up from this point, how do I go about doing that?
I have tried the following:
final String path = getServletContext().getRealPath("./");
final String path2 = getServletContext().getRealPath("../");
final String path3 = getServletContext().getRealPath(".../");
I need so save files outside of the ROOT folder, but only one level up, so that everytime I update my website, it doesn't replace the physically uploaded files within the ROOT folder, and rather only touch the web site files.
Thanks