I am using Below code for LOGOUT
public String logout() throws ServletException {
        cleanSession();
        FacesContext.getCurrentInstance().getExternalContext()
                .invalidateSession();
        HttpServletRequest request = (HttpServletRequest) FacesContext
                .getCurrentInstance().getExternalContext().getRequest();
        FacesContext.getCurrentInstance().getExternalContext()
                .invalidateSession();
            return "Logout";
    }
Logout.xhtml page inside login folder but i am end up with
Unable to find matching navigation case with from-view-id '/core/dashboard.xhtml' for action '#{loginBean.logout}' with outcome 'Logout'
I tried maximum solution provide in Stackoverflow but not able to get solution..I tried below code as well
public String logout() throws ServletException {
        cleanSession();
        FacesContext.getCurrentInstance().getExternalContext()
                .invalidateSession();
        HttpServletRequest request = (HttpServletRequest) FacesContext
                .getCurrentInstance().getExternalContext().getRequest();
        FacesContext.getCurrentInstance().getExternalContext()
                .invalidateSession();
        try {
            String action = request.getContextPath()
                    + "/login/Logout.xhtml";
            return action;
        } catch (Exception e) {
            LOG.error("Exception in forwarding at Logout", e);
        }
        return null;
    }
But same issue ..Can anyone tell me what the issue?
I made slight change and added this
<p:commandLink ajax="false" rendered="#{loginBean.loginStatus}"
                    value="Logout" actionListener="#{loginBean.logout}" action="Logout">
                </p:commandLink>
it was previously like this
<p:commandLink ajax="false" rendered="#{loginBean.loginStatus}"
                    value="Logout" action="#{loginBean.logout}"
                     >
                </p:commandLink>
 
    