private static final long serialVersionUID = -1029291219058930682L;
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
Mode mode = ModeSelector.getMode(req.getParameter("mode"));
Modules modules = null;
try {
modules = new Modules(req, mode);
} catch (ModuleNotFoundException e) {
resp.setContentType("text/plain");
PrintWriter out = resp.getWriter();
out.println(e.getMsg());
return;
} catch (IncompatibleModuleException e) {
resp.setContentType("text/plain");
PrintWriter out = resp.getWriter();
out.println(e.getMsg());
return;
}
mode.addModulesFiles(modules);
//@SuppressWarnings("unused")
//Files files = new Files(modules.getModules());
List<ZipFile> zipFiles = new ArrayList<ZipFile>();
for (File currentFile : mode.getFiles()){
ZipFile currentZipFile = new ZipFile();
currentZipFile.setZipPath(currentFile.getRealPath());
if (currentFile.isModify()){
currentZipFile.setTemplate(new TemplateFile(currentFile.getTemplatePath()));
currentZipFile.fillContent(mode);