Infatti funziona tutto!!! Nello specifico ho risolto così:
codice:
String rootPath = this.sc.getRealPath("/");
System.setProperty("root", rootPath);
Setto la root path come proprietà del sistema e poi la richiamo con il metodo
codice:
System.getProperty("root");
nelle classi dove ho bisogno di scrivere i file. Quindi il codice diventa:
codice:
System.getProperty("root");
if(root == null)
root = "";
this.outFile = new File(root + QUERY_OUTPUT_PATH + File.separator + QUERY_OUTPUT_FILE);
this.osw = new OutputStreamWriter(new FileOutputStream(this.outFile), Charset.forName("UTF-8"));
Grazie ancora!!!

PS Potete mettere risolto...