I am using tomcat basic authentication for my web app:
I added following lines to web.xml in my web app:
public void logout() throws IOException { HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext().getRequest(); try { request.logout(); } catch (ServletException ex) { throw new IOException(ex); } }