@RequestMapping(value = "/katalog", method = RequestMethod.GET)
    public String biblioteka(Locale locale, Model model, HttpServletRequest request) {
        boolean zmiana = false;
        int id = 0;
        int atrybut = 0;
        String wyrazenie = "";

        if (request.getParameter("filter") != null) {
            System.out.println(request.getParameter("wyrazenie"));
            atrybut = Integer.parseInt(request.getParameter("kategoria"));
            wyrazenie = request.getParameter("wyrazenie");
        }

        if ((request.getParameter("sort") != null)) {
            bd.setSort(Integer.parseInt(request.getParameter("sort")));
        }

        if ((request.getParameter("id") != null)
                && (request.getParameter("action") != null)) {
            if (request.getParameter("action").equals("delete")) {
                bd.removeKsiazka(Integer.parseInt(request.getParameter("id")));
            }
            if (request.getParameter("action").equals("update")) {
                zmiana = true;
                id = Integer.parseInt(request.getParameter("id"));
                model.addAttribute("ksiazka", bd.getKsiazka(id));
            }
        }

        model.addAttribute("katalog", bd.getAllSortedKsiazka(atrybut, wyrazenie));
        model.addAttribute(new Ksiazka());
        //System.out.println("asdfasdf");
        return "katalog";
    }