public void redirect() {
        String roleName = db.getRole();
        ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext();
        try {
            if (roleName != null) {
                if (roleName.equals("customer")) {
                    externalContext.redirect(externalContext.getRequestContextPath() + "/faces/protected/customer/customer.xhtml");
                }
                if (roleName.equals("chef")) {
                    externalContext.redirect(externalContext.getRequestContextPath() + "/faces/protected/worker/chefIndex.xhtml");
                }
                if (roleName.equals("salesman")) {
                    externalContext.redirect(externalContext.getRequestContextPath() + "/faces/protected/worker/salesmanIndex.xhtml");
                }
                if (roleName.equals("driver")) {
                    externalContext.redirect(externalContext.getRequestContextPath() + "/faces/protected/driver/driverMobile.xhtml");
                }
                if (roleName.equals("admin")) {
                    externalContext.redirect(externalContext.getRequestContextPath() + "/faces/protected/admin/adminIndex.xhtml");
                }
            }
        } catch (IOException e) {
            System.out.println("IOException");
        }

    }