for(String fileName : fileNames) {
File file = new File(documentsDir, fileName);
try {
DocumentInitialize docInitialize = new DocumentInitialize(couchDb, file);
docInitialize.upload();
} catch(Exception e) {
throw new ServletException("Problem pushing document: "+file.getAbsolutePath(), e);
}
}
}