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 ServletDeleteUser extends HttpServlet {
    private static final Logger log = LoggerFactory.getLogger(ServletDeleteUser.class);

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        response.setContentType("text/html");
        try {
            Class.forName("org.postgresql.Driver");
            Storage storage = new Storage();
            storage.delete(request.getParameter("login"));
        } catch (SQLException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

@@ -335,32 +335,55 @@
 l.SQLException;%0A
+import java.util.List;%0A
 import java.util
@@ -616,16 +616,2157 @@
 lass);%0A%0A
+    @Override%0A    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException %7B%0A        response.setContentType(%22text/html%22);%0A        PrintWriter writer = new PrintWriter(response.getOutputStream());%0A        try %7B%0A            Class.forName(%22org.postgresql.Driver%22);%0A            Storage storage = new Storage();%0A            List%3CUser%3E users = storage.getList();%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%3ELogin%3C/th%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 (User user : users) %7B%0A                writer.append(%22%3Ctr%3E%3Ctd%3E%22)%0A                        .append(user.getLogin())%0A                        .append(%22%3C/td%3E%3Ctd%3E%22)%0A                        .append(user.getName())%0A                        .append(%22%3C/td%3E%3Ctd%3E%22)%0A                        .append(user.getEmail())%0A                        .append(%22%3C/td%3E%3Ctd%3E%22)%0A                        .append(user.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%3Cbr/%3E%22 +%0A                    %22%3Cbr/%3E%22 +%0A                    %22%3Cform action='%22+request.getContextPath()+%22/deleteUser' method='post'%3E%22 +%0A                    %22Login : %3Cinput type='text' name='login'/%3E%3Cbr/%3E%22 +%0A                    %22%3Cinput type='submit'%3E%22 +%0A                    %22%3C/form%3E%22 +%0A                    %22%3C/body%3E%22 +%0A                    %22%3C/html%3E%22);%0A        %7D catch (Exception e) %7B%0A            e.printStackTrace();%0A        %7D finally %7B%0A            writer.flush();%0A        %7D%0A    %7D%0A%0A
     @Ove

Add HTML page for ServletDeleteUser.java