public void generateAll() throws Exception { for (VelocityAction va : vActions) { Assert.isNotNull( va.getOutputFilePath(), "this velocity generator must have an output stream where to write"); // the output is a path where it's possible to obtain a stream String out = va.getOutputFilePath(); File f = new File(out); Writer fw = new FileWriter(f); generate(va, fw); } }