protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String language = (String) request.getSession().getAttribute("language");
        ArrayList<Translation> elements = (ArrayList<Translation>) request.getSession().getAttribute("elements");
        RequestDispatcher rd;
        FileSystemFacade facade = new FileSystemFacade();
        rd = request.getRequestDispatcher("allDictionaries.jsp");

        for (Translation element1 : elements) {
            String element = request.getParameter(element1.getElement());
            if (element == null || element.equals("")) {
                message = "Some elements are empty!";
                noEmptyFields = false;
                rd = request.getRequestDispatcher("changeDictionary.jsp");
            }
        }

        if (noEmptyFields) {
            Translator translator = Translator.getInstance();
            Dictionary dictionary = translator.selectDictionary(language);
            facade.deleteDictionary(dictionary);

            dictionary.setLanguage(language);

            for (Translation element : elements) {
                element.setLanguage(language);
                System.out.println(request.getParameter(element.getElement()));
                element.setElementTranslation(request.getParameter(element.getElement()));
            }
            facade.writeDictionary(dictionary);
            
            message = "Dictionary is changed";
        }

        request.setAttribute("message", message);
        rd.forward(request, response);
    }