if (uploaderFileList.size() > 0) {
String path = this.getClass().getResource("/").getPath();
for (UploaderFile file : uploaderFileList) {
File newFile = new File(path + File.separator + "documents" + File.separator + file.getName());
FileUtils.copyFile(file, newFile);
DocumentRelation relation = new DocumentRelation();
relation.setFileName(file.getUploadName());
relation.setLocation(newFile.getPath());
relation.setCreateDate(new Timestamp(System.currentTimeMillis()));
relationDao.save(relation);
if(DocViewer.isSupport(FilenameUtils.getExtension(file.getUploadName()))){
relation = relationDao.getRelationByLocation(relation.getLocation());
DocViewer.addConvertWorker(relation.getId());
}
}
response.sendRedirect("/continue.jsp");
}