package ru.aserdyuchenko.servlet;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;
import java.util.Map;

/**
 * @author Anton Serdyuchenko. anton415@gmail.com
 * @since 05.11.2017 18:30
 */
public class ServletGetUser extends HttpServlet {
    private static final Logger log = LoggerFactory.getLogger(ServletGetUser.class);

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html");
        PrintWriter writer = new PrintWriter(response.getOutputStream());
        try {
            Class.forName("org.postgresql.Driver");
            Storage storage = new Storage();
            Map<String, User> users = storage.get();
            writer.append(users.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
        writer.flush();
    }
}

@@ -360,19 +360,93 @@
 va.util.
-Map
+Collection;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Set
 ;%0A%0A/**%0A 
@@ -1097,40 +1097,1215 @@
     
-writer.append(users.toString());
+Set%3CMap.Entry%3CString, User%3E%3E list = users.entrySet();%0A%0A//            writer.append(users.toString());%0A            writer.append(%0A                    %22%3C!DOCTYPE html%3E%22 +%0A                    %22%3Chtml lang=%5C%22en%5C%22%3E%22 +%0A                    %22%3Chead%3E%22 +%0A                    %22   %3Cmeta charset=%5C%22UTF-8%5C%22%3E%22 +%0A                    %22   %3Ctitle%3E%3C/title%3E%22 +%0A                    %22%3C/head%3E%22 +%0A                    %22%3Cbody%3E%22 +%0A                    %22%3Ctable style=%5C%22width:100%25%5C%22%3E%22 +%0A                    %22%3Ctr%3E%22 +%0A                    %22%3Cth%3EName%3C/th%3E %22 +%0A                    %22%3Cth%3EEmail%3C/th%3E%22 +%0A                    %22%3Cth%3ECreate date%3C/th%3E%22 +%0A                    %22%3C/tr%3E%22);%0A%0A            for (Map.Entry%3CString, User%3E user : list) %7B%0A                writer.append(%22%3Ctr%3E%3Ctd%3E%22)%0A                        .append(user.getValue().getName())%0A                        .append(%22%3C/td%3E%3Ctd%3E%22)%0A                        .append(user.getValue().getEmail())%0A                        .append(%22%3C/td%3E%3Ctd%3E%22)%0A                        .append(user.getValue().getCreateDate())%0A                        .append(%22%3C/td%3E%3C/tr%3E%22);%0A            %7D%0A%0A            writer.append(%22%3C/table%3E%22 +%0A                    %22%3C/form%3E%22 +%0A                    %22%3C/body%3E%22 +%0A                    %22%3C/html%3E%22);%0A%0A
 %0A   
@@ -2375,25 +2375,37 @@
        %7D
-%0A
+ finally %7B%0A  
         
 writer.f
@@ -2392,24 +2392,26 @@
 %7B%0A          
+  
 writer.flush
@@ -2410,20 +2410,30 @@
 er.flush();%0A
+        %7D%0A
     %7D%0A%7D%0A

Add HTML page for ServletGetUser.java