@Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        if (request.getParameter("command").equals("Insert")) {
            String name = request.getParameter("name");
            String description = request.getParameter("description");
            if(name.equals(""))
                request.setAttribute("nullName", "Enter name");
            if(description.equals(""))
                request.setAttribute("nullDesc", "Enter description");
            if ((!name.equals("")) && (!description.equals(""))) {
                name = name.toUpperCase();
                if (checkName(name) == true) {
                    request.setAttribute("error", "Master data with such ID exist!");
                } else {
                    MasterDataEntity masterData = new MasterDataEntity(name, description);
                    proxy.insertMasterData(masterData);
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException ex) {
                    }
                }
            }
        }
        if (request.getParameter("command").equals("Remove")) {

            String value = (String) request.getParameter("selectMD");
            proxy.removeMasterData(value);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException ex) {
            }
        }
        request.getRequestDispatcher("/masterData.jsp").forward(request, response);
    }